* [PATCH] virtio_gpio: drop packed attribute
@ 2021-11-01 9:11 Michael S. Tsirkin
2021-11-02 3:33 ` Viresh Kumar
2021-11-04 15:38 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2021-11-01 9:11 UTC (permalink / raw)
To: linux-kernel
Cc: Enrico Weigelt, metux IT consult, Viresh Kumar, Jason Wang,
linux-gpio, virtualization
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 <mst@redhat.com>
---
include/uapi/linux/virtio_gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/virtio_gpio.h b/include/uapi/linux/virtio_gpio.h
index 0445f905d8cc..25c95a034674 100644
--- a/include/uapi/linux/virtio_gpio.h
+++ b/include/uapi/linux/virtio_gpio.h
@@ -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 {
--
MST
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio_gpio: drop packed attribute
2021-11-01 9:11 [PATCH] virtio_gpio: drop packed attribute Michael S. Tsirkin
@ 2021-11-02 3:33 ` Viresh Kumar
2021-11-04 15:38 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2021-11-02 3:33 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: linux-kernel, Enrico Weigelt, metux IT consult, Viresh Kumar,
Jason Wang, linux-gpio, virtualization
On 01-11-21, 05:11, Michael S. Tsirkin wrote:
> 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 <mst@redhat.com>
> ---
> include/uapi/linux/virtio_gpio.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/virtio_gpio.h b/include/uapi/linux/virtio_gpio.h
> index 0445f905d8cc..25c95a034674 100644
> --- a/include/uapi/linux/virtio_gpio.h
> +++ b/include/uapi/linux/virtio_gpio.h
> @@ -25,7 +25,7 @@ struct virtio_gpio_config {
> __le16 ngpio;
> __u8 padding[2];
> __le32 gpio_names_size;
> -} __packed;
> +};
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio_gpio: drop packed attribute
2021-11-01 9:11 [PATCH] virtio_gpio: drop packed attribute Michael S. Tsirkin
2021-11-02 3:33 ` Viresh Kumar
@ 2021-11-04 15:38 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2021-11-04 15:38 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Linux Kernel Mailing List, Enrico Weigelt, metux IT consult,
Viresh Kumar, Jason Wang, open list:GPIO SUBSYSTEM,
virtualization
On Mon, Nov 1, 2021 at 10:11 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> 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 <mst@redhat.com>
> ---
> include/uapi/linux/virtio_gpio.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/virtio_gpio.h b/include/uapi/linux/virtio_gpio.h
> index 0445f905d8cc..25c95a034674 100644
> --- a/include/uapi/linux/virtio_gpio.h
> +++ b/include/uapi/linux/virtio_gpio.h
> @@ -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 {
> --
> MST
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-04 15:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 9:11 [PATCH] virtio_gpio: drop packed attribute Michael S. Tsirkin
2021-11-02 3:33 ` Viresh Kumar
2021-11-04 15:38 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).