Commit ffd7339a authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

RDMA/core: Use offsetofend() instead of open coding

parent 48062b0a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -491,8 +491,7 @@ struct uapi_definition {
 */
#define UVERBS_ATTR_STRUCT(_type, _last)                                       \
	.zero_trailing = 1,                                                    \
	UVERBS_ATTR_SIZE(((uintptr_t)(&((_type *)0)->_last + 1)),              \
			 sizeof(_type))
	UVERBS_ATTR_SIZE(offsetofend(_type, _last), sizeof(_type))
/*
 * Specifies at least min_len bytes must be passed in, but the amount can be
 * larger, up to the protocol maximum size. No check for zeroing is done.