* [PATCH] media: allegro-dvt: Use __packed sentence
@ 2021-01-29 20:01 Emmanuel Arias
2021-01-29 23:54 ` David Laight
2021-01-30 8:51 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: Emmanuel Arias @ 2021-01-29 20:01 UTC (permalink / raw)
To: m.tretter, kernel, mchehab; +Cc: gregkh, linux-media, devel, linux-kernel
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;
unsigned int head;
ssize_t size;
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] media: allegro-dvt: Use __packed sentence
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
2021-01-30 8:51 ` Greg KH
1 sibling, 1 reply; 5+ messages in thread
From: David Laight @ 2021-01-29 23:54 UTC (permalink / raw)
To: 'Emmanuel Arias', m.tretter, kernel, mchehab
Cc: gregkh, linux-media, devel, linux-kernel
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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: allegro-dvt: Use __packed sentence
2021-01-29 20:01 [PATCH] media: allegro-dvt: Use __packed sentence Emmanuel Arias
2021-01-29 23:54 ` David Laight
@ 2021-01-30 8:51 ` Greg KH
2021-01-30 14:50 ` Emmanuel Arias
1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-01-30 8:51 UTC (permalink / raw)
To: Emmanuel Arias
Cc: m.tretter, kernel, mchehab, linux-media, devel, linux-kernel
On Fri, Jan 29, 2021 at 05:01:54PM -0300, Emmanuel Arias wrote:
> Fix coding style using __packed sentece instead of
Spelling check please?
And _why_ are you making this change, what does this do "better" than
the original?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: allegro-dvt: Use __packed sentence
2021-01-30 8:51 ` Greg KH
@ 2021-01-30 14:50 ` Emmanuel Arias
0 siblings, 0 replies; 5+ messages in thread
From: Emmanuel Arias @ 2021-01-30 14:50 UTC (permalink / raw)
To: Greg KH; +Cc: m.tretter, kernel, mchehab, linux-media, devel, linux-kernel
Hi,
>
> Spelling check please?
>
> And _why_ are you making this change, what does this do "better" than
> the original?
>
Actually, I'm really new here, and this is my first patch. I run the
checkpatch.pl, and give me that recommendation.
I would like to look the David comments.
Thanks!
eamanu
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: allegro-dvt: Use __packed sentence
2021-01-29 23:54 ` David Laight
@ 2021-02-01 9:23 ` Michael Tretter
0 siblings, 0 replies; 5+ messages in thread
From: Michael Tretter @ 2021-02-01 9:23 UTC (permalink / raw)
To: David Laight
Cc: 'Emmanuel Arias',
kernel, mchehab, gregkh, linux-media, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-01 9:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-30 8:51 ` Greg KH
2021-01-30 14:50 ` Emmanuel Arias
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).