linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Emmanuel Arias' <eamanu@yaerobi.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"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: Mon, 1 Feb 2021 10:23:17 +0100	[thread overview]
Message-ID: <20210201092317.GB6717@pengutronix.de> (raw)
In-Reply-To: <63a4ed5c2ef54c09b2df9d6234b68711@AcuMS.aculab.com>

On Fri, 29 Jan 2021 23:54:41 +0000, David Laight wrote:
> 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.

Not sure, what you mean by this.

> But that is only likely if part of some binary sequence.
> In which case I'd expect it to be marked __be or __le.

It is part of a binary sequence. It is the header of messages in a mailbox
that is used to exchange data with a co-processor (video encoder). In fact, it
should be marked as __le.

Michael

  reply	other threads:[~2021-02-01  9:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 20:01 [PATCH] media: allegro-dvt: Use __packed sentence Emmanuel Arias
2021-01-29 23:54 ` David Laight
2021-02-01  9:23   ` Michael Tretter [this message]
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=20210201092317.GB6717@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=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=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;
as well as URLs for NNTP newsgroup(s).