Message ID | 1567687896-19996-4-git-send-email-zhongjiang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | replace code with FIELD_SIZEOF | expand |
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)
It's more clear to use FIELD_SIZEOF instead of its implementation. Signed-off-by: zhong jiang <zhongjiang@huawei.com> --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)