From: David Laight <David.Laight@ACULAB.COM>
To: 'Emmanuel Arias' <eamanu@yaerobi.com>,
"m.tretter@pengutronix.de" <m.tretter@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"mchehab@kernel.org" <mchehab@kernel.org>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] media: allegro-dvt: Use __packed sentence
Date: Fri, 29 Jan 2021 23:54:41 +0000 [thread overview]
Message-ID: <63a4ed5c2ef54c09b2df9d6234b68711@AcuMS.aculab.com> (raw)
In-Reply-To: <YBRpstkOi685uHef@debian>
From: Emmanuel Arias
> Sent: 29 January 2021 20:02
>
> Fix coding style using __packed sentece instead of
> __attribute__((__packed__)).
>
> Signed-off-by: Emmanuel Arias <eamanu@yaerobi.com>
> ---
> drivers/staging/media/allegro-dvt/allegro-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/allegro-dvt/allegro-core.c b/drivers/staging/media/allegro-
> dvt/allegro-core.c
> index 9f718f43282b..cee624dac61a 100644
> --- a/drivers/staging/media/allegro-dvt/allegro-core.c
> +++ b/drivers/staging/media/allegro-dvt/allegro-core.c
> @@ -670,7 +670,7 @@ static ssize_t allegro_mbox_read(struct allegro_mbox *mbox,
> struct {
> u16 length;
> u16 type;
> - } __attribute__ ((__packed__)) *header;
> + } __packed *header;
> struct regmap *sram = mbox->dev->sram;
Does this actually need to be packed?
The only reason would be if the structure could exist on a 2n+1
boundary.
But that is only likely if part of some binary sequence.
In which case I'd expect it to be marked __be or __le.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2021-01-29 23:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 20:01 Emmanuel Arias
2021-01-29 23:54 ` David Laight [this message]
2021-02-01 9:23 ` Michael Tretter
2021-01-30 8:51 ` Greg KH
2021-01-30 14:50 ` Emmanuel Arias
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=63a4ed5c2ef54c09b2df9d6234b68711@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=devel@driverdev.osuosl.org \
--cc=eamanu@yaerobi.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.tretter@pengutronix.de \
--cc=mchehab@kernel.org \
/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®