From: Michael S. Tsirkin Date: Mon, 29 Dec 2025 23:58:05 +0000 (-0500) Subject: gpio: virtio: reorder fields to reduce struct padding X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a266b6d9cfa42997f31942d1754ddf220ba7a1c;p=thirdparty%2Flinux.git gpio: virtio: reorder fields to reduce struct padding Reorder struct virtio_gpio_line fields to place the DMA buffers (req/res) last. This eliminates the padding from aligning struct size on ARCH_DMA_MINALIGN. Acked-by: Viresh Kumar Message-ID: Acked-by: Bartosz Golaszewski Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/gpio/gpio-virtio.c b/drivers/gpio/gpio-virtio.c index b702946267707..ed6e0e90fa8aa 100644 --- a/drivers/gpio/gpio-virtio.c +++ b/drivers/gpio/gpio-virtio.c @@ -26,11 +26,12 @@ struct virtio_gpio_line { struct mutex lock; /* Protects line operation */ struct completion completion; + unsigned int rxlen; + __dma_from_device_group_begin(); struct virtio_gpio_request req; struct virtio_gpio_response res; __dma_from_device_group_end(); - unsigned int rxlen; }; struct vgpio_irq_line {