Skip to contentSkip to conversation

platform/x86: dell-wmi-sysman: set fw_attr_class storage-class to static

PATCH In review [email protected] 2 participants 2 messages Jun 9, 2021

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

PATCH 1/1 platform/x86: dell-wmi-sysman: set fw_attr_class storage-class to static

From: Tom Rix <[email protected]>

An allyesconfig has this linking error drivers/platform/x86/think-lmi.o:
multiple definition of `fw_attr_class'
drivers/platform/x86/dell/dell-wmi-sysman/sysman.o:
first defined here

fw_attr_class is only used locally, so change to static

---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -1
index 1378c18786582..636bdfa83284d 100644
@@ -25,7 +25,7 @@ struct wmi_sysman_priv wmi_priv = {
 /* reset bios to defaults */
 static const char * const reset_types[] = {"builtinsafe", "lastknowngood", "factory", "custom"};
 static int reset_option = -1;
-struct class *fw_attr_class;
+static struct class *fw_attr_class;
 
 
 /**
Signature · 1 line
2.26.3
#1 lore raw

Hi Tom,

Quoted 11 lines · On 6/9/21 5:34 PM, [email protected] wrote:

From: Tom Rix <[email protected]>

An allyesconfig has this linking error drivers/platform/x86/think-lmi.o:
multiple definition of `fw_attr_class'
drivers/platform/x86/dell/dell-wmi-sysman/sysman.o:
first defined here

fw_attr_class is only used locally, so change to static

Thank you for your 2 patches, I just merged another patch doing the same earlier today.

Regards,

Hans

Quoted 18 lines
---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -1
index 1378c18786582..636bdfa83284d 100644
@@ -25,7 +25,7 @@ struct wmi_sysman_priv wmi_priv = {
 /* reset bios to defaults */
 static const char * const reset_types[] = {"builtinsafe", "lastknowngood", "factory", "custom"};
 static int reset_option = -1;
-struct class *fw_attr_class;
+static struct class *fw_attr_class;
 
 
 /**