diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2025-12-29 18:58:05 -0500 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-01-28 15:32:16 -0500 |
| commit | 1a266b6d9cfa42997f31942d1754ddf220ba7a1c (patch) | |
| tree | 44c00f26667d205725bf79e568a38b7860a3aaac /drivers | |
| parent | 29615fe3fb5015a96a14cfa43bd168034719ddeb (diff) | |
| download | lwn-1a266b6d9cfa42997f31942d1754ddf220ba7a1c.tar.gz lwn-1a266b6d9cfa42997f31942d1754ddf220ba7a1c.zip | |
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 <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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpio/gpio-virtio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-virtio.c b/drivers/gpio/gpio-virtio.c index b70294626770..ed6e0e90fa8a 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 { |
