diff options
author | Bodong Wang <bodong@mellanox.com> | 2019-02-13 09:55:32 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-02-14 23:14:41 +0300 |
commit | 20bbf22a622178db71fb8bea5f9000d6f346185a (patch) | |
tree | 67f08f34662d644ec3f4667259362141e995b2af /include/linux | |
parent | 224d71ccc07c6b221e4fdff7cd3d04c6033228c5 (diff) | |
download | linux-20bbf22a622178db71fb8bea5f9000d6f346185a.tar.xz |
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 <bodong@mellanox.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mlx5/device.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 0845a227a7b2..46223efa1877 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 { \ |