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

Shenwei Wang shenwei.wang at nxp.com
Thu Feb 19 13:12:19 PST 2026



> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Thursday, February 19, 2026 2:51 PM
> To: Shenwei Wang <shenwei.wang at nxp.com>
> Cc: Arnaud POULIQUEN <arnaud.pouliquen at foss.st.com>; Linus Walleij
> <linusw at kernel.org>; Bartosz Golaszewski <brgl at kernel.org>; Jonathan Corbet
> <corbet at lwn.net>; Rob Herring <robh at kernel.org>; Krzysztof Kozlowski
> <krzk+dt at kernel.org>; Conor Dooley <conor+dt at kernel.org>; Bjorn Andersson
> <andersson at kernel.org>; Mathieu Poirier <mathieu.poirier at linaro.org>; Frank Li
> <frank.li at nxp.com>; Sascha Hauer <s.hauer at pengutronix.de>; Shuah Khan
> <skhan at linuxfoundation.org>; linux-gpio at vger.kernel.org; linux-
> doc at vger.kernel.org; linux-kernel at vger.kernel.org; Pengutronix Kernel Team
> <kernel at pengutronix.de>; Fabio Estevam <festevam at gmail.com>; Peng Fan
> <peng.fan at nxp.com>; devicetree at vger.kernel.org; linux-
> remoteproc at vger.kernel.org; imx at lists.linux.dev; linux-arm-
> kernel at lists.infradead.org; dl-linux-imx <linux-imx at nxp.com>; Bartosz
> Golaszewski <brgl at bgdev.pl>
> Subject: [EXT] Re: [PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver
> > > 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.
> 

The fact is that there are many __packed usages just under the Ethernet directory.
$ grep -rn __packed drivers/net/ethernet | wc -l
553

Regards,
Shenwei

> 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



More information about the linux-arm-kernel mailing list