From: Ingo Molnar <mingo@elte.hu>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mark Langsdorf <mark.langsdorf@amd.com>,
Andreas Herrmann <andreas.herrmann3@amd.com>
Subject: Re: [PATCH -tip] x86: cpu/intel_cacheinfo.c fix compilation warnings
Date: Tue, 14 Apr 2009 15:32:42 +0200 [thread overview]
Message-ID: <20090414133242.GB27163@elte.hu> (raw)
In-Reply-To: <1239712990.3079.17.camel@ht.satnam>
* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
> fix:
> arch/x86/kernel/cpu/intel_cacheinfo.c: In function ‘show_cache_disable’:
> arch/x86/kernel/cpu/intel_cacheinfo.c:712: warning: unused variable ‘node’
> arch/x86/kernel/cpu/intel_cacheinfo.c: In function ‘store_cache_disable’:
> arch/x86/kernel/cpu/intel_cacheinfo.c:739: warning: unused variable ‘node’
you again 'fixed' a warning.
this made you fail to analyze and miss the real reason for this for
example:
> arch/x86/kernel/cpu/intel_cacheinfo.c:739: warning: unused variable ‘node’
> - int node = cpu_to_node(cpu);
the local variable is clearly initialized.
The problem is not with that variable - the problem is most likely
with the cpu_to_node() macro not creating a reference to the 'cpu'
variable in a compiler-visible way, in the !NUMA case.
The typical way to solve this is to add a dummy:
(void)(cpu)
use to the 'cpu' parameter to the macro definition - or, (which is a
much better solution), to convert it to an inline function.
Ingo
next prev parent reply other threads:[~2009-04-14 13:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 12:43 Jaswinder Singh Rajput
2009-04-14 13:32 ` Ingo Molnar [this message]
2009-04-14 16:46 ` Jaswinder Singh Rajput
2009-04-14 16:54 ` Ingo Molnar
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=20090414133242.GB27163@elte.hu \
--to=mingo@elte.hu \
--cc=andreas.herrmann3@amd.com \
--cc=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.langsdorf@amd.com \
--cc=x86@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®