[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070430192250.1967a77b.akpm@linux-foundation.org>
Date: Mon, 30 Apr 2007 19:22:50 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: David Rientjes <rientjes@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [patch] pci: type may be unused in pci_access_init()
On Mon, 30 Apr 2007 07:34:52 -0700 (PDT) David Rientjes <rientjes@...gle.com> wrote:
> The automatic 'type' variable is unused in !CONFIG_PCI_DIRECT and
> !CONFIG_PCI_MMCONFIG.
>
> Cc: Greg Kroah-Hartman <gregkh@...e.de>
> Signed-off-by: David Rientjes <rientjes@...gle.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.
-
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