diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2020-05-27 16:41:52 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-05-27 18:46:05 +0200 |
commit | bebcfe85f4338ba1434561a460169a5e0af78f98 (patch) | |
tree | 5e6e85eea42137cbd5fee745abd5ccb9ddd33ba9 /include/rdma/uverbs_ioctl.h | |
parent | RDMA/ipoib: Remove can_sleep parameter from iboib_mcast_alloc (diff) | |
download | linux-bebcfe85f4338ba1434561a460169a5e0af78f98.tar.xz 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 '')
-rw-r--r-- | include/rdma/uverbs_ioctl.h | 12 |
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 */ |