summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/ud_header.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-05-27 09:41:52 -0500
committerJason Gunthorpe <jgg@mellanox.com>2020-05-27 13:46:05 -0300
commitbebcfe85f4338ba1434561a460169a5e0af78f98 (patch)
tree5e6e85eea42137cbd5fee745abd5ccb9ddd33ba9 /drivers/infiniband/core/ud_header.c
parentebd6e96b33a23fe84d1a64441a04d7bc91ccc519 (diff)
downloadlinux-bebcfe85f4338ba1434561a460169a5e0af78f98.tar.bz2
RDMA/core: Use sizeof_field() helper
Make use of the sizeof_field() helper instead of an open-coded version. Link: https://lore.kernel.org/r/20200527144152.GA22605@embeddedor Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/ud_header.c')
-rw-r--r--drivers/infiniband/core/ud_header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/ud_header.c b/drivers/infiniband/core/ud_header.c
index 29a45d2f8898..d65d541b9a25 100644
--- a/drivers/infiniband/core/ud_header.c
+++ b/drivers/infiniband/core/ud_header.c
@@ -41,7 +41,7 @@
#define STRUCT_FIELD(header, field) \
.struct_offset_bytes = offsetof(struct ib_unpacked_ ## header, field), \
- .struct_size_bytes = sizeof ((struct ib_unpacked_ ## header *) 0)->field, \
+ .struct_size_bytes = sizeof_field(struct ib_unpacked_ ## header, field), \
.field_name = #header ":" #field
static const struct ib_field lrh_table[] = {