path: root/drivers/net/mlx5/mlx5_prm.h
diff options
authorDekel Peled <>2019-05-15 13:11:38 +0300
committerFerruh Yigit <>2019-05-27 10:20:55 +0200
commit73f008334ff427ec6ff680600bcf3ebb57459752 (patch)
tree58a782107681618e84a38bbba976ee68d0975a35 /drivers/net/mlx5/mlx5_prm.h
parentfe3b65c202700364daa5d7b560be90ec36ed3c30 (diff)
net/mlx5: remove redundant size calculation macro
Patch [1] added, among other definitions, the macro MLX5_ST_SZ_DB. Patch [2] added later the macro MLX5_ST_SZ_BYTES, which is exactly the same macro with a different name. Each of these macros was used in very few places. This patch removes the definition of MLX5_ST_SZ_DB, and replaces it with MLX5_ST_SZ_BYTES wherever it was used. Macro MLX5_ST_SZ_BYTES was preffered since it is the same macro name used in kernel code, see [3]. [1] [2] [3] Signed-off-by: Dekel Peled <> Acked-by: Shahaf Shuler <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_prm.h')
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 8c42380..602a5ac 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -378,7 +378,6 @@ typedef uint8_t u8;
#define __mlx5_mask16(typ, fld) ((u16)((1ull << __mlx5_bit_sz(typ, fld)) - 1))
#define MLX5_ST_SZ_BYTES(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 8)
#define MLX5_ST_SZ_DW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 32)
-#define MLX5_ST_SZ_DB(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 8)
#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))