Commit 1bc5ba83 authored by Gal Pressman's avatar Gal Pressman Committed by Jason Gunthorpe

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/20190826115350.21718-3-galpress@amazon.comReviewed-by: default avatarDaniel Kranzdorf <dkkranzd@amazon.com>
Reviewed-by: default avatarFiras JahJah <firasj@amazon.com>
Signed-off-by: default avatarGal Pressman <galpress@amazon.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 958b6813
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment