From: Dmitry Osipenko <digetx@gmail.com>
To: rafaelgoncalves@riseup.net, mchehab@kernel.org,
gregkh@linuxfoundation.org, thierry.reding@gmail.com,
jonathanh@nvidia.com, linux-media@vger.kernel.org,
linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org
Subject: Re: [PATCH] media: staging: tegra-vde: Change from __attribute to __packed.
Date: Wed, 7 Nov 2018 15:01:08 +0300 [thread overview]
Message-ID: <bc0d606c-c2e7-c23d-e1a5-cb9e0a30a937@gmail.com> (raw)
In-Reply-To: <20181107022324.11994-1-rafaelgoncalves@riseup.net>
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.
prev parent reply other threads:[~2018-11-07 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 2:23 rafaelgoncalves
2018-11-07 12:01 ` Dmitry Osipenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc0d606c-c2e7-c23d-e1a5-cb9e0a30a937@gmail.com \
--to=digetx@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lkcamp@lists.libreplanetbr.org \
--cc=mchehab@kernel.org \
--cc=rafaelgoncalves@riseup.net \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®