aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGal Pressman <[email protected]>2019-08-26 14:53:50 +0300
committerJason Gunthorpe <[email protected]>2019-08-27 13:01:15 -0300
commit1bc5ba836e3ba02b8c7981a1fb453fe33513526d (patch)
tree4c9bc18be518dd3bbff157d850423de91afc13f2
parent958b6813f0c077c45a36d0a10b5bdcd27216eabe (diff)
RDMA/efa: Use existing FIELD_SIZEOF macro
Use FIELD_SIZEOF macro instead of hard coding it in field_avail macro. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Daniel Kranzdorf <[email protected]> Reviewed-by: Firas JahJah <[email protected]> Signed-off-by: Gal Pressman <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/hw/efa/efa_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 1e23c621a419..4edae89e8e3c 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -148,7 +148,7 @@ static inline struct efa_ah *to_eah(struct ib_ah *ibah)
}
#define field_avail(x, fld, sz) (offsetof(typeof(x), fld) + \
- sizeof(((typeof(x) *)0)->fld) <= (sz))
+ FIELD_SIZEOF(typeof(x), fld) <= (sz))
#define is_reserved_cleared(reserved) \
!memchr_inv(reserved, 0, sizeof(reserved))