Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1233694

[PATCH 1/2] x86/cpu/cacheinfo: num_cache_leaves should be static

From Geliang Tang <geliangtang@163.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] x86/cpu/cacheinfo: num_cache_leaves should be static
Date 2015-09-27 17:50 +0200
Message-ID <qdmn7-31g-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Fixes the following sparse warning:

arch/x86/kernel/cpu/intel_cacheinfo.c:160:33: warning: symbol
'num_cache_leaves' was not declared. Should it be static?

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 arch/x86/kernel/cpu/intel_cacheinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index be4febc..6245a3c 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -157,7 +157,7 @@ struct _cpuid4_info_regs {
 	struct amd_northbridge *nb;
 };
 
-unsigned short			num_cache_leaves;
+static unsigned short num_cache_leaves;
 
 /* AMD doesn't have CPUID4. Emulate it here to report the same
    information to the user.  This makes some assumptions about the machine:
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 1/2] x86/cpu/cacheinfo: num_cache_leaves should be static Geliang Tang <geliangtang@163.com> - 2015-09-27 17:50 +0200

csiph-web