mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Chris Forbes <chrisf@ijw.co.nz>
Cc: Massimo Dal Zotto <dz@debian.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: char: i8k: Use __packed
Date: Sun, 3 Jul 2011 18:03:56 +0200	[thread overview]
Message-ID: <201107031803.56124.arnd@arndb.de> (raw)
In-Reply-To: <1309656605-20812-1-git-send-email-chrisf@ijw.co.nz>

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

      reply	other threads:[~2011-07-03 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03  1:30 Chris Forbes
2011-07-03 16:03 ` Arnd Bergmann [this message]

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=201107031803.56124.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=chrisf@ijw.co.nz \
    --cc=dz@debian.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®