diff mbox series

[-next] powerpc/powernv: Make some sysbols static

Message ID 20190702131733.44100-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Commit bc75e5438488edef80d952d1146701f872092750
Headers show
Series [-next] powerpc/powernv: Make some sysbols static | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch next (c7d64b560ce80d8c44f082eee8352f0778a73195)
snowpatch_ozlabs/build-ppc64le success Build succeeded and removed 4 sparse warnings
snowpatch_ozlabs/build-ppc64be success Build succeeded and removed 4 sparse warnings
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 29 lines checked

Commit Message

Yue Haibing July 2, 2019, 1:17 p.m. UTC
Fix sparse warnings:

arch/powerpc/platforms/powernv/opal-psr.c:20:1:
 warning: symbol 'psr_mutex' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-psr.c:27:3:
 warning: symbol 'psr_attrs' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-powercap.c:20:1:
 warning: symbol 'powercap_mutex' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-sensor-groups.c:20:1:
 warning: symbol 'sg_mutex' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 arch/powerpc/platforms/powernv/opal-powercap.c      | 2 +-
 arch/powerpc/platforms/powernv/opal-psr.c           | 4 ++--
 arch/powerpc/platforms/powernv/opal-sensor-groups.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Michael Ellerman Nov. 14, 2019, 9:07 a.m. UTC | #1
On Tue, 2019-07-02 at 13:17:33 UTC, YueHaibing wrote:
> Fix sparse warnings:
> 
> arch/powerpc/platforms/powernv/opal-psr.c:20:1:
>  warning: symbol 'psr_mutex' was not declared. Should it be static?
> arch/powerpc/platforms/powernv/opal-psr.c:27:3:
>  warning: symbol 'psr_attrs' was not declared. Should it be static?
> arch/powerpc/platforms/powernv/opal-powercap.c:20:1:
>  warning: symbol 'powercap_mutex' was not declared. Should it be static?
> arch/powerpc/platforms/powernv/opal-sensor-groups.c:20:1:
>  warning: symbol 'sg_mutex' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/bc75e5438488edef80d952d1146701f872092750

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/powernv/opal-powercap.c b/arch/powerpc/platforms/powernv/opal-powercap.c
index dc599e7..c16d44f 100644
--- a/arch/powerpc/platforms/powernv/opal-powercap.c
+++ b/arch/powerpc/platforms/powernv/opal-powercap.c
@@ -13,7 +13,7 @@ 
 
 #include <asm/opal.h>
 
-DEFINE_MUTEX(powercap_mutex);
+static DEFINE_MUTEX(powercap_mutex);
 
 static struct kobject *powercap_kobj;
 
diff --git a/arch/powerpc/platforms/powernv/opal-psr.c b/arch/powerpc/platforms/powernv/opal-psr.c
index b6ccb30..69d7e75 100644
--- a/arch/powerpc/platforms/powernv/opal-psr.c
+++ b/arch/powerpc/platforms/powernv/opal-psr.c
@@ -13,11 +13,11 @@ 
 
 #include <asm/opal.h>
 
-DEFINE_MUTEX(psr_mutex);
+static DEFINE_MUTEX(psr_mutex);
 
 static struct kobject *psr_kobj;
 
-struct psr_attr {
+static struct psr_attr {
 	u32 handle;
 	struct kobj_attribute attr;
 } *psr_attrs;
diff --git a/arch/powerpc/platforms/powernv/opal-sensor-groups.c b/arch/powerpc/platforms/powernv/opal-sensor-groups.c
index 31f13c1..f8ae1fb 100644
--- a/arch/powerpc/platforms/powernv/opal-sensor-groups.c
+++ b/arch/powerpc/platforms/powernv/opal-sensor-groups.c
@@ -13,7 +13,7 @@ 
 
 #include <asm/opal.h>
 
-DEFINE_MUTEX(sg_mutex);
+static DEFINE_MUTEX(sg_mutex);
 
 static struct kobject *sg_kobj;