Skip to content

stddef: Simplify TRAILING_OVERLAP() and improve docs

Uwe Kleine-König lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2stddef: Add a comment about why TRAILING_OVERLAP() existsinclude/linux/stddef.h+11 -10 replies
2/2stddef: Stop using FAM parameter of TRAILING_OVERLAP()include/linux/stddef.h+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] stddef: Simplify TRAILING_OVERLAP() and improve docs

Hello,

as a follup to the discussion I had with Gustavo in reply to
https://lore.kernel.org/linux-pwm/aJtRPZpc-Lv-C6zD@kspp here comes my suggestion to improve TRAILING_OVERLAP() for wider audience.

While working at it, I wonder if __packed should also better be part of the macro to ensure that

	struct myfamstruct {
		char c;
		char payload[];
	};

	TRAILING_OVERLAP(struct myfamstruct, mfs, payload,
		unsigned int payload_as_int;
	) fs;

does the right thing. This however is orthogonal and better discussed separately from this patch set.

Best regards
Uwe

Uwe Kleine-König (2):
stddef: Add a comment about why TRAILING_OVERLAP() exists
stddef: Stop using FAM parameter of TRAILING_OVERLAP()

 include/linux/stddef.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585

Signature · 1 line
2.50.1