mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/cpu/cacheinfo: num_cache_leaves should be static
@ 2015-09-27 15:40 Geliang Tang
  2015-09-27 15:40 ` [PATCH 2/2] x86/cpu/cacheinfo: amd_get/set_l3_disable_slot " Geliang Tang
  0 siblings, 1 reply; 3+ messages in thread
From: Geliang Tang @ 2015-09-27 15:40 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Borislav Petkov, Sudeep Holla, Andrew Morton, Tejun Heo
  Cc: Geliang Tang, linux-kernel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] x86/cpu/cacheinfo: amd_get/set_l3_disable_slot should be static
  2015-09-27 15:40 [PATCH 1/2] x86/cpu/cacheinfo: num_cache_leaves should be static Geliang Tang
@ 2015-09-27 15:40 ` Geliang Tang
  2015-09-28  7:25   ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Geliang Tang @ 2015-09-27 15:40 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Borislav Petkov, Sudeep Holla, Andrew Morton, Tejun Heo
  Cc: Geliang Tang, linux-kernel

Fixes the following sparse warnings:

 arch/x86/kernel/cpu/intel_cacheinfo.c:329:5: warning: symbol
 'amd_get_l3_disable_slot' was not declared. Should it be static?

 arch/x86/kernel/cpu/intel_cacheinfo.c:406:5: warning: symbol
 'amd_set_l3_disable_slot' was not declared. Should it be static?

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

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 6245a3c..e38d338 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -326,7 +326,7 @@ static void amd_calc_l3_indices(struct amd_northbridge *nb)
  *
  * @returns: the disabled index if used or negative value if slot free.
  */
-int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot)
+static int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot)
 {
 	unsigned int reg = 0;
 
@@ -403,8 +403,8 @@ static void amd_l3_disable_index(struct amd_northbridge *nb, int cpu,
  *
  * @return: 0 on success, error status on failure
  */
-int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu, unsigned slot,
-			    unsigned long index)
+static int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu,
+			    unsigned slot, unsigned long index)
 {
 	int ret = 0;
 
-- 
2.5.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] x86/cpu/cacheinfo: amd_get/set_l3_disable_slot should be static
  2015-09-27 15:40 ` [PATCH 2/2] x86/cpu/cacheinfo: amd_get/set_l3_disable_slot " Geliang Tang
@ 2015-09-28  7:25   ` Borislav Petkov
  0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2015-09-28  7:25 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Sudeep Holla,
	Andrew Morton, Tejun Heo, linux-kernel

On Sun, Sep 27, 2015 at 11:40:46PM +0800, Geliang Tang wrote:
> Fixes the following sparse warnings:
> 
>  arch/x86/kernel/cpu/intel_cacheinfo.c:329:5: warning: symbol
>  'amd_get_l3_disable_slot' was not declared. Should it be static?
> 
>  arch/x86/kernel/cpu/intel_cacheinfo.c:406:5: warning: symbol
>  'amd_set_l3_disable_slot' was not declared. Should it be static?
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  arch/x86/kernel/cpu/intel_cacheinfo.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Both applied,
thanks.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-28  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-27 15:40 [PATCH 1/2] x86/cpu/cacheinfo: num_cache_leaves should be static Geliang Tang
2015-09-27 15:40 ` [PATCH 2/2] x86/cpu/cacheinfo: amd_get/set_l3_disable_slot " Geliang Tang
2015-09-28  7:25   ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome