Skip to contentSkip to conversation

EDAC, thunderx: Make symbol 'lmc_dfs_ents' static

PATCH Applied Wei Yongjun 3 participants 3 messages Jul 14, 2020 – Aug 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC, thunderx: Make symbol 'lmc_dfs_ents' static

The sparse tool complains as follows:

drivers/edac/thunderx_edac.c:457:22: warning:
symbol 'lmc_dfs_ents' was not declared. Should it be static?

Symbol 'lmc_dfs_ents' is not used outside of thunderx_edac.c, so marks it static.

---
 drivers/edac/thunderx_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/thunderx_edac.c +1 -1
index 4af9744cc6d0..0eb5eb97fd74 100644
@@ -454,7 +454,7 @@ DEBUGFS_STRUCT(inject_int, 0200, thunderx_lmc_inject_int_write, NULL);
 DEBUGFS_STRUCT(inject_ecc, 0200, thunderx_lmc_inject_ecc_write, NULL);
 DEBUGFS_STRUCT(int_w1c, 0400, NULL, thunderx_lmc_int_read);
 
-struct debugfs_entry *lmc_dfs_ents[] = {
+static struct debugfs_entry *lmc_dfs_ents[] = {
 	&debugfs_mask0,
 	&debugfs_mask2,
 	&debugfs_parity_test,
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Wei Yongjun

The sparse tool complains as follows:

drivers/edac/thunderx_edac.c:457:22: warning:
symbol 'lmc_dfs_ents' was not declared. Should it be static?

Symbol 'lmc_dfs_ents' is not used outside of thunderx_edac.c, so marks it static.

Quoted 18 lines
---
 drivers/edac/thunderx_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/thunderx_edac.c +1 -1
index 4af9744cc6d0..0eb5eb97fd74 100644
@@ -454,7 +454,7 @@ DEBUGFS_STRUCT(inject_int, 0200, thunderx_lmc_inject_int_write, NULL);
 DEBUGFS_STRUCT(inject_ecc, 0200, thunderx_lmc_inject_ecc_write, NULL);
 DEBUGFS_STRUCT(int_w1c, 0400, NULL, thunderx_lmc_int_read);
 
-struct debugfs_entry *lmc_dfs_ents[] = {
+static struct debugfs_entry *lmc_dfs_ents[] = {
 	&debugfs_mask0,
 	&debugfs_mask2,
 	&debugfs_parity_test,
maintainer Applied
#2 lore raw
In reply to Wei Yongjun
Quoted 19 lines · Wei Yongjun

The sparse tool complains as follows:

drivers/edac/thunderx_edac.c:457:22: warning:
symbol 'lmc_dfs_ents' was not declared. Should it be static?

Symbol 'lmc_dfs_ents' is not used outside of thunderx_edac.c, so marks it static.

---
 drivers/edac/thunderx_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/thunderx_edac.c +0 -0
index 4af9744cc6d0..0eb5eb97fd74 100644

drivers/edac/thunderx_edac.c DEBUGFS_STRUCT(inject_int, 0200, thunderx_lmc_inject_int_write, NULL); · line 460

Quoted 8 lines
drivers/edac/thunderx_edac.c +1 -1
@@ -454,7 +454,7 @@ DEBUGFS_STRUCT(inject_int, 0200, thunderx_lmc_inject_int_write, NULL);
 DEBUGFS_STRUCT(inject_ecc, 0200, thunderx_lmc_inject_ecc_write, NULL);
 DEBUGFS_STRUCT(int_w1c, 0400, NULL, thunderx_lmc_int_read);
 
-struct debugfs_entry *lmc_dfs_ents[] = {
+static struct debugfs_entry *lmc_dfs_ents[] = {
 	&debugfs_mask0,
 	&debugfs_mask2,
 	&debugfs_parity_test,

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette