From: Bodong Wang Date: Wed, 13 Feb 2019 06:55:32 +0000 (-0800) Subject: net/mlx5: Use void pointer as the type in address_of macro X-Git-Tag: v5.4-rc1~984^2~48^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20bbf22a622178db71fb8bea5f9000d6f346185a;p=platform%2Fkernel%2Flinux-rpi.git net/mlx5: Use void pointer as the type in address_of macro Better to use void * and avoid unnecessary casts. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed --- diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 0845a22..46223ef 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h @@ -67,7 +67,7 @@ #define MLX5_UN_SZ_BYTES(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 8) #define MLX5_UN_SZ_DW(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 32) #define MLX5_BYTE_OFF(typ, fld) (__mlx5_bit_off(typ, fld) / 8) -#define MLX5_ADDR_OF(typ, p, fld) ((char *)(p) + MLX5_BYTE_OFF(typ, fld)) +#define MLX5_ADDR_OF(typ, p, fld) ((void *)((uint8_t *)(p) + MLX5_BYTE_OFF(typ, fld))) /* insert a value to a struct */ #define MLX5_SET(typ, p, fld, v) do { \