Skip to contentSkip to conversation

EDAC/ghes: change ghes_hw from global to static

PATCH Applied Tom Rix 2 participants 2 messages Apr 21, 2022 – Apr 29, 2022

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 EDAC/ghes: change ghes_hw from global to static

Smatch reports this issue
ghes_edac.c:44:3: warning: symbol 'ghes_hw' was not declared. Should it be static?

ghes_hw is only used in ghes_edac.c so change its
storage-class specifier to static.

---
 drivers/edac/ghes_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/ghes_edac.c +1 -1
index 2805d5610300..59b0bedc9c24 100644
@@ -38,7 +38,7 @@ static struct ghes_pvt *ghes_pvt;
  * This driver's representation of the system hardware, as collected
  * from DMI.
  */
-struct ghes_hw_desc {
+static struct ghes_hw_desc {
 	int num_dimms;
 	struct dimm_info *dimms;
 } ghes_hw;
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw
Quoted 17 lines · Tom Rix

Smatch reports this issue
ghes_edac.c:44:3: warning: symbol 'ghes_hw' was not declared. Should it be static?

ghes_hw is only used in ghes_edac.c so change its
storage-class specifier to static.

---
 drivers/edac/ghes_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/ghes_edac.c +0 -0
index 2805d5610300..59b0bedc9c24 100644

drivers/edac/ghes_edac.c static struct ghes_pvt *ghes_pvt; · line 44

Quoted 8 lines
drivers/edac/ghes_edac.c +1 -1
@@ -38,7 +38,7 @@ static struct ghes_pvt *ghes_pvt;
  * This driver's representation of the system hardware, as collected
  * from DMI.
  */
-struct ghes_hw_desc {
+static struct ghes_hw_desc {
 	int num_dimms;
 	struct dimm_info *dimms;
 } ghes_hw;

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

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