[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201107031803.56124.arnd@arndb.de>
Date: Sun, 3 Jul 2011 18:03:56 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Chris Forbes <chrisf@....co.nz>
Cc: Massimo Dal Zotto <dz@...ian.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: char: i8k: Use __packed
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists