Skip to content

Commit

Permalink
RDMA/efa: Use existing FIELD_SIZEOF macro
Browse files Browse the repository at this point in the history
Use FIELD_SIZEOF macro instead of hard coding it in field_avail macro.

Link: https://lore.kernel.org/r/20190826115350.21718-3-galpress@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com>
Reviewed-by: Firas JahJah <firasj@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Gal Pressman authored and Jason Gunthorpe committed Aug 27, 2019
1 parent 958b681 commit 1bc5ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/efa/efa_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1bc5ba8

Please sign in to comment.