On 22.10.2021 12:47, Lin Liu wrote:
> @@ -28,7 +28,7 @@ static inline void put_unaligned_le32(u32 val, void *p)
>  
>  #endif
>  
> -#define get_le32(p) le32_to_cpup((const uint32_t *)(p))
> +#define get_le32(p) le32_to_cpu(*(const uint32_t *)(p))

While here the adjustment may be okay as there is already an
open-coded cast, ...

> @@ -20,7 +20,7 @@
>  
>  static inline uint16_t get_unaligned_be16(const void *p)
>  {
> -     return be16_to_cpup(p);
> +     return be16_to_cpu(*(uint16_t*)p);

... here and below you add open-coded casts. Is there a reason you
don't retain the ..._to_cpup() macros?

Jan


Reply via email to