Thread (69 messages) 69 messages, 8 authors, 2026-02-27

Re: [PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-02-19 20:51:12
Also in: imx, linux-devicetree, linux-doc, linux-gpio, linux-remoteproc, lkml

quoted
Any reason to use __packed and alignement here?
This structure will be copied in a vring buffer right?
Using __packed together with an explicit alignment is a common pattern for defining 
communication packets. The goal is to ensure a stable and predictable layout across 
different architectures and compilers.
Being mostly a netdev person, i can say that the network Maintainers
actually refuses patches with __packed. If you have designed your
protocol correctly, defined your structure correctly, you should not
need them.

We do however accept things like

	BUILD_BUG_ON(sizeof(strcut foo) != 8);

just to make sure the compile is doing what you expect.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help