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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -37,7 +37,7 @@ struct virtio_gpio_config { · 36 unmodified lines | |||
| 37 | __le16 ngpio; | 37 | __le16 ngpio; |
| 38 | __u8 padding[2]; | 38 | __u8 padding[2]; |
| 39 | __le32 gpio_names_size; | 39 | __le32 gpio_names_size; |
| 40 | } __packed; | 40 | }; |
| 41 | 41 | ||
| 42 | /* Virtio GPIO Request / Response */ | 42 | /* Virtio GPIO Request / Response */ |
| 43 | struct virtio_gpio_request { | 43 | struct virtio_gpio_request { |