* [PATCH] media: staging: tegra-vde: Change from __attribute to __packed.
@ 2018-11-07 2:23 rafaelgoncalves
2018-11-07 12:01 ` Dmitry Osipenko
0 siblings, 1 reply; 2+ messages in thread
From: rafaelgoncalves @ 2018-11-07 2:23 UTC (permalink / raw)
To: digetx, mchehab, gregkh, thierry.reding, jonathanh, linux-media,
linux-tegra, devel, linux-kernel, lkcamp
Cc: Rafael Goncalves
From: Rafael Goncalves <rafaelgoncalves@riseup.net>
Correct the following warnings from checkpatch.pl:
WARNING: __packed is preferred over __attribute__((packed))
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
+} __attribute__((packed));
Signed-off-by: Rafael Goncalves <rafaelgoncalves@riseup.net>
---
Hi.
It's my first patch submission, please let me know if there is something
that I can improve.
---
drivers/staging/media/tegra-vde/uapi.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/tegra-vde/uapi.h b/drivers/staging/media/tegra-vde/uapi.h
index a50c7bcae057..5ffa4afa4047 100644
--- a/drivers/staging/media/tegra-vde/uapi.h
+++ b/drivers/staging/media/tegra-vde/uapi.h
@@ -29,7 +29,7 @@ struct tegra_vde_h264_frame {
__u32 flags;
__u32 reserved;
-} __attribute__((packed));
+} __packed;
struct tegra_vde_h264_decoder_ctx {
__s32 bitstream_data_fd;
@@ -61,7 +61,7 @@ struct tegra_vde_h264_decoder_ctx {
__u8 num_ref_idx_l1_active_minus1;
__u32 reserved;
-} __attribute__((packed));
+} __packed;
#define VDE_IOCTL_BASE ('v' + 0x20)
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: staging: tegra-vde: Change from __attribute to __packed.
2018-11-07 2:23 [PATCH] media: staging: tegra-vde: Change from __attribute to __packed rafaelgoncalves
@ 2018-11-07 12:01 ` Dmitry Osipenko
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Osipenko @ 2018-11-07 12:01 UTC (permalink / raw)
To: rafaelgoncalves, mchehab, gregkh, thierry.reding, jonathanh,
linux-media, linux-tegra, devel, linux-kernel, lkcamp
On 07.11.2018 5:23, rafaelgoncalves@riseup.net wrote:
> From: Rafael Goncalves <rafaelgoncalves@riseup.net>
>
> Correct the following warnings from checkpatch.pl:
>
> WARNING: __packed is preferred over __attribute__((packed))
> +} __attribute__((packed));
>
> WARNING: __packed is preferred over __attribute__((packed))
> +} __attribute__((packed));
>
> Signed-off-by: Rafael Goncalves <rafaelgoncalves@riseup.net>
>
> ---
>
> Hi.
> It's my first patch submission, please let me know if there is something
> that I can improve.
> ---
> drivers/staging/media/tegra-vde/uapi.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/tegra-vde/uapi.h b/drivers/staging/media/tegra-vde/uapi.h
> index a50c7bcae057..5ffa4afa4047 100644
> --- a/drivers/staging/media/tegra-vde/uapi.h
> +++ b/drivers/staging/media/tegra-vde/uapi.h
> @@ -29,7 +29,7 @@ struct tegra_vde_h264_frame {
> __u32 flags;
>
> __u32 reserved;
> -} __attribute__((packed));
> +} __packed;
>
> struct tegra_vde_h264_decoder_ctx {
> __s32 bitstream_data_fd;
> @@ -61,7 +61,7 @@ struct tegra_vde_h264_decoder_ctx {
> __u8 num_ref_idx_l1_active_minus1;
>
> __u32 reserved;
> -} __attribute__((packed));
> +} __packed;
>
> #define VDE_IOCTL_BASE ('v' + 0x20)
>
>
Hello Rafael,
Thank you very much for the patch, but looks like it is not correct. The Userspace API header is supposed to be used by kernel and userspace, the __packed macro is available in kernel only.
Interestingly there few places in include/uapi/ that use __packed macro, I'm wondering if they are correct. Note that GCC just won't complain about undefined qualifier, at least by default.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-07 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 2:23 [PATCH] media: staging: tegra-vde: Change from __attribute to __packed rafaelgoncalves
2018-11-07 12:01 ` Dmitry Osipenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.