All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: [patch] pci: type may be unused in pci_access_init()
Date: Mon, 30 Apr 2007 19:22:50 -0700	[thread overview]
Message-ID: <20070430192250.1967a77b.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0704291659480.1822@chino.kir.corp.google.com>

On Mon, 30 Apr 2007 07:34:52 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:

> The automatic 'type' variable is unused in !CONFIG_PCI_DIRECT and
> !CONFIG_PCI_MMCONFIG.
> 
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
>  arch/i386/pci/init.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/i386/pci/init.c b/arch/i386/pci/init.c
> --- a/arch/i386/pci/init.c
> +++ b/arch/i386/pci/init.c
> @@ -6,7 +6,7 @@

Please use `diff -p'.

>     in the right sequence from here. */
>  static __init int pci_access_init(void)
>  {
> -	int type = 0;
> +	int type __attribute__((unused)) = 0;

We have __attribute_used__ for this, but the implementation looks whacky:
it's there for gcc-3 but not for gcc-4 and the intel compiler.

But it looks like the gcc-3 version is there to iron over a gcc
implementation glitch.

>  #ifdef CONFIG_PCI_DIRECT
>  	type = pci_direct_probe();

Of course, one could do 

	int type = pci_direct_probe();

here instead, but that's a bit fragile.

  reply	other threads:[~2007-05-01  2:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 14:34 [patch] pci: type may be unused in pci_access_init() David Rientjes
2007-05-01  2:22 ` Andrew Morton [this message]
2007-05-01  2:46   ` David Rientjes
2007-05-01  3:20     ` Andrew Morton

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=20070430192250.1967a77b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.