media: allegro-dvt: Use __packed sentence
Subsystems (2)
PATCH 1/1 media: allegro-dvt: Use __packed sentence
Fix coding style using __packed sentece instead of __attribute__((__packed__)).
--- drivers/staging/media/allegro-dvt/allegro-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/allegro-dvt/allegro-core.c +1 -1
@@ -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;
Signature · 1 line
2.29.2
From: Emmanuel Arias
Quoted 16 lines
Sent: 29 January 2021 20:02
Fix coding style using
__packedsentece instead of __attribute__((__packed__)).Signed-off-by Emmanuel Arias <[email protected]>--- drivers/staging/media/allegro-dvt/allegro-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/allegro- renamed from drivers/staging/media/allegro-dvt/allegro-core.c +0
-0
dvt/allegro-core.c
index9f718f43282b..cee624dac61a100644
drivers/staging/media/allegro-dvt/allegro-core.c static ssize_t allegro_mbox_read(struct allegro_mbox *mbox, · line 674
Quoted 6 lines
drivers/staging/media/allegro-dvt/allegro-core.c +1
-1@@ -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)
Greg KH
maintainerQuoted 1 line · Emmanuel Arias
Fix coding style using
__packedsentece instead of
Spelling check please?
And _why_ are you making this change, what does this do "better" than the original?
thanks,
greg k-h
Hi,
Quoted 6 lines
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
Quoted 3 lines
thanks,
greg k-h
Quoted 11 lines · David Laight
From: Emmanuel Arias
Quoted 10 lines
Sent: 29 January 2021 20:02
Fix coding style using
__packedsentece instead of __attribute__((__packed__)).Signed-off-by Emmanuel Arias <[email protected]>--- drivers/staging/media/allegro-dvt/allegro-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
drivers/staging/media/allegro-dvt/allegro-core.c static ssize_t allegro_mbox_read(struct allegro_mbox *mbox, · line 674
Quoted 12 lines
drivers/staging/media/allegro- renamed from drivers/staging/media/allegro-dvt/allegro-core.c +0
-0
dvt/allegro-core.c
index9f718f43282b..cee624dac61a100644drivers/staging/media/allegro-dvt/allegro-core.c +1
-1@@ -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.
Quoted 2 lines
But that is only likely if part of some binary sequence. In which case I'd expect it to be marked
__beor__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