]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: virtio: reorder fields to reduce struct padding
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Dec 2025 23:58:05 +0000 (18:58 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Jan 2026 20:32:16 +0000 (15:32 -0500)
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 <viresh.kumar@linaro.org>
Message-ID: <f1221bbc120df6adaba9006710a517f1e84a10b2.1767601130.git.mst@redhat.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/gpio/gpio-virtio.c

index b702946267707080734e0c06a5657548a300a331..ed6e0e90fa8aa72735ced0bd11de60b231c884fb 100644 (file)
@@ -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 {