[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -tip] x86: cpu/intel_cacheinfo.c fix compilation warnings

* Jaswinder Singh Rajput <> 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

> 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:


use to the 'cpu' parameter to the macro definition - or, (which is a
much better solution), to convert it to an inline function.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-04-14 15:35    [W:0.052 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site