[PATCH -next] powerpc/papr_scm: Make some symbols static

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE2199d LANDED

Landed in mainline as 19a551b254e6 on 2020-07-26.

2 messages, 2 authors, 2020-07-27 · open the first message on its own page

[PATCH -next] powerpc/papr_scm: Make some symbols static

From: Wei Yongjun <hidden>
Date: 2020-07-25 09:11:56

The sparse tool complains as follows:

arch/powerpc/platforms/pseries/papr_scm.c:97:1: warning:
 symbol 'papr_nd_regions' was not declared. Should it be static?
arch/powerpc/platforms/pseries/papr_scm.c:98:1: warning:
 symbol 'papr_ndr_lock' was not declared. Should it be static?

Those variables are not used outside of papr_scm.c, so this
commit marks them static.

Fixes: 85343a8da2d9 ("powerpc/papr/scm: Add bad memory ranges to nvdimm bad ranges")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wei Yongjun <redacted>
---
 arch/powerpc/platforms/pseries/papr_scm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index 8fd441d32487..3d1235a76ba9 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -94,8 +94,8 @@ struct papr_scm_priv {
 	u64 health_bitmap;
 };
 
-LIST_HEAD(papr_nd_regions);
-DEFINE_MUTEX(papr_ndr_lock);
+static LIST_HEAD(papr_nd_regions);
+static DEFINE_MUTEX(papr_ndr_lock);
 
 static int drc_pmem_bind(struct papr_scm_priv *p)
 {

Re: [PATCH -next] powerpc/papr_scm: Make some symbols static

From: Michael Ellerman <hidden>
Date: 2020-07-27 07:27:07

On Sat, 25 Jul 2020 17:19:49 +0800, Wei Yongjun wrote:
The sparse tool complains as follows:

arch/powerpc/platforms/pseries/papr_scm.c:97:1: warning:
 symbol 'papr_nd_regions' was not declared. Should it be static?
arch/powerpc/platforms/pseries/papr_scm.c:98:1: warning:
 symbol 'papr_ndr_lock' was not declared. Should it be static?

[...]
Applied to powerpc/next.

[1/1] powerpc/papr_scm: Make some symbols static
      https://git.kernel.org/powerpc/c/19a551b254e6c308348a46a65332aa03c01767ed

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help