aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/rdma
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 /include/rdma
parentRDMA/ipoib: Remove can_sleep parameter from iboib_mcast_alloc (diff)
downloadwireguard-linux-bebcfe85f4338ba1434561a460169a5e0af78f98.tar.xz
wireguard-linux-bebcfe85f4338ba1434561a460169a5e0af78f98.zip
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 'include/rdma')
-rw-r--r--include/rdma/uverbs_ioctl.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h
index 5bd2b037e914..0418d7bddf3e 100644
--- a/include/rdma/uverbs_ioctl.h
+++ b/include/rdma/uverbs_ioctl.h
@@ -420,9 +420,9 @@ struct uapi_definition {
.scope = UAPI_SCOPE_OBJECT, \
.needs_fn_offset = \
offsetof(struct ib_device_ops, ibdev_fn) + \
- BUILD_BUG_ON_ZERO( \
- sizeof(((struct ib_device_ops *)0)->ibdev_fn) != \
- sizeof(void *)), \
+ BUILD_BUG_ON_ZERO(sizeof_field(struct ib_device_ops, \
+ ibdev_fn) != \
+ sizeof(void *)), \
}
/*
@@ -435,9 +435,9 @@ struct uapi_definition {
.scope = UAPI_SCOPE_METHOD, \
.needs_fn_offset = \
offsetof(struct ib_device_ops, ibdev_fn) + \
- BUILD_BUG_ON_ZERO( \
- sizeof(((struct ib_device_ops *)0)->ibdev_fn) != \
- sizeof(void *)), \
+ BUILD_BUG_ON_ZERO(sizeof_field(struct ib_device_ops, \
+ ibdev_fn) != \
+ sizeof(void *)), \
}
/* Call a function to determine if the entire object is supported or not */