[PATCH 3/3] IB/mlx5: Use FIELD_SIZEOF directly
From: zhong jiang
Date: Thu Sep 05 2019 - 08:55:02 EST
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
---
drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index c3ea299..e5681f7 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -65,7 +65,7 @@
__LINE__, current->pid, ##arg)
#define field_avail(type, fld, sz) (offsetof(type, fld) + \
- sizeof(((type *)0)->fld) <= (sz))
+ FIELD_SIZEOF(type, fld) <= (sz))
#define MLX5_IB_DEFAULT_UIDX 0xffffff
#define MLX5_USER_ASSIGNED_UIDX_MASK __mlx5_mask(qpc, user_index)
--
1.7.12.4