virtio_gpio: drop packed attribute
Subsystems (3)
Michael S. Tsirkin
maintainerPATCH 1/1 virtio_gpio: drop packed attribute
Declaring the struct packed here is mostly harmless, but gives a bad example for people to copy. As the struct is packed and aligned manually, let's just drop the attribute.
Signed-off-by Michael S. Tsirkin <[email protected]>
--- include/uapi/linux/virtio_gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/virtio_gpio.h +1 -1
@@ -25,7 +25,7 @@ struct virtio_gpio_config {__le16 ngpio;__u8 padding[2 ];__le32 gpio_names_size; -} __packed; +};/* Virtio GPIO Request / Response */ struct virtio_gpio_request {
Signature · 1 line
MST
Quoted 15 lines · Michael S. Tsirkin
Declaring the struct packed here is mostly harmless, but gives a bad example for people to copy. As the struct is packed and aligned manually, let's just drop the attribute.
Signed-off-by Michael S. Tsirkin <[email protected]>--- include/uapi/linux/virtio_gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/virtio_gpio.h +0
-0
include/uapi/linux/virtio_gpio.h struct virtio_gpio_config { · line 28
Quoted 5 lines
include/uapi/linux/virtio_gpio.h +1
-1@@ -25,7 +25,7 @@ struct virtio_gpio_config {__le16 ngpio;__u8 padding[2 ];__le32 gpio_names_size; -} __packed; +};
Acked-by Viresh Kumar <[email protected]>
Signature · 1 line
viresh
Bartosz Golaszewski
AppliedQuoted 25 lines · Michael S. Tsirkin
Declaring the struct packed here is mostly harmless, but gives a bad example for people to copy. As the struct is packed and aligned manually, let's just drop the attribute.
Signed-off-by Michael S. Tsirkin <[email protected]>--- include/uapi/linux/virtio_gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/virtio_gpio.h +1
-2@@ -25,7 +25,7 @@ struct virtio_gpio_config {__le16 ngpio;__u8 padding[2 ];__le32 gpio_names_size; -} __packed; +};/* Virtio GPIO Request / Response */ struct virtio_gpio_request { --
Quoted 2 lines
MST
Applied, thanks!
Bart