Skip to content

Commit 1a266b6

Browse files
committed
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>
1 parent 29615fe commit 1a266b6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpio/gpio-virtio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ struct virtio_gpio_line {
2626
struct mutex lock; /* Protects line operation */
2727
struct completion completion;
2828

29+
unsigned int rxlen;
30+
2931
__dma_from_device_group_begin();
3032
struct virtio_gpio_request req;
3133
struct virtio_gpio_response res;
3234
__dma_from_device_group_end();
33-
unsigned int rxlen;
3435
};
3536

3637
struct vgpio_irq_line {

0 commit comments

Comments
 (0)