mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: char: i8k: Use __packed
@ 2011-07-03  1:30 Chris Forbes
  2011-07-03 16:03 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Forbes @ 2011-07-03  1:30 UTC (permalink / raw)
  To: Massimo Dal Zotto; +Cc: linux-kernel, Chris Forbes

Replaced __attribute__ ((packed)) with __packed

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
---
 drivers/char/i8k.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
index 6e40072..d9c93d4 100644
--- a/drivers/char/i8k.c
+++ b/drivers/char/i8k.c
@@ -103,11 +103,11 @@ static const struct file_operations i8k_fops = {
 
 struct smm_regs {
 	unsigned int eax;
-	unsigned int ebx __attribute__ ((packed));
-	unsigned int ecx __attribute__ ((packed));
-	unsigned int edx __attribute__ ((packed));
-	unsigned int esi __attribute__ ((packed));
-	unsigned int edi __attribute__ ((packed));
+	unsigned int ebx __packed;
+	unsigned int ecx __packed;
+	unsigned int edx __packed;
+	unsigned int esi __packed;
+	unsigned int edi __packed;
 };
 
 static inline const char *i8k_get_dmi_data(int field)
-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: char: i8k: Use __packed
  2011-07-03  1:30 [PATCH] drivers: char: i8k: Use __packed Chris Forbes
@ 2011-07-03 16:03 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2011-07-03 16:03 UTC (permalink / raw)
  To: Chris Forbes; +Cc: Massimo Dal Zotto, linux-kernel

On Sunday 03 July 2011 03:30:05 Chris Forbes wrote:
> diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
> index 6e40072..d9c93d4 100644
> --- a/drivers/char/i8k.c
> +++ b/drivers/char/i8k.c
> @@ -103,11 +103,11 @@ static const struct file_operations i8k_fops = {
>  
>  struct smm_regs {
>         unsigned int eax;
> -       unsigned int ebx __attribute__ ((packed));
> -       unsigned int ecx __attribute__ ((packed));
> -       unsigned int edx __attribute__ ((packed));
> -       unsigned int esi __attribute__ ((packed));
> -       unsigned int edi __attribute__ ((packed));
> +       unsigned int ebx __packed;
> +       unsigned int ecx __packed;
> +       unsigned int edx __packed;
> +       unsigned int esi __packed;
> +       unsigned int edi __packed;
>  };

The attribute is not useful at all here, because the structure is guaranteed
to be packed anyway. Better just remote the attributes without replacement.

	Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-03 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-03  1:30 [PATCH] drivers: char: i8k: Use __packed Chris Forbes
2011-07-03 16:03 ` Arnd Bergmann

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®