Skip to contentSkip to conversation

platform/x86/dell-wmi-sysman: Make wmi_sysman_kobj_sysfs_ops static

PATCH Superseded Zou Wei 2 participants 2 messages Oct 29, 2020 – Nov 3, 2020 x86 platform drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 platform/x86/dell-wmi-sysman: Make wmi_sysman_kobj_sysfs_ops static

Fix the following sparse warning:

drivers/platform/x86/dell-wmi-sysman/sysman.c:258:24: warning:
symbol 'wmi_sysman_kobj_sysfs_ops' was not declared. Should it be static?

wmi_sysman_kobj_sysfs_ops has only call within sysman.c It should be static

---
 drivers/platform/x86/dell-wmi-sysman/sysman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-wmi-sysman/sysman.c +1 -1
index 3842575..c6862c3 100644
@@ -255,7 +255,7 @@ static ssize_t wmi_sysman_attr_store(struct kobject *kobj, struct attribute *att
 	return ret;
 }
 
-const struct sysfs_ops wmi_sysman_kobj_sysfs_ops = {
+static const struct sysfs_ops wmi_sysman_kobj_sysfs_ops = {
 	.show	= wmi_sysman_attr_show,
 	.store	= wmi_sysman_attr_store,
 };
Signature · 1 line
2.6.2
#1 lore raw

Hi,

Quoted 11 lines · Zou Wei

Fix the following sparse warning:

drivers/platform/x86/dell-wmi-sysman/sysman.c:258:24: warning:
symbol 'wmi_sysman_kobj_sysfs_ops' was not declared. Should it be static?

wmi_sysman_kobj_sysfs_ops has only call within sysman.c It should be static

Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans

Quoted 18 lines
---
 drivers/platform/x86/dell-wmi-sysman/sysman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-wmi-sysman/sysman.c +1 -1
index 3842575..c6862c3 100644
@@ -255,7 +255,7 @@ static ssize_t wmi_sysman_attr_store(struct kobject *kobj, struct attribute *att
 	return ret;
 }
 
-const struct sysfs_ops wmi_sysman_kobj_sysfs_ops = {
+static const struct sysfs_ops wmi_sysman_kobj_sysfs_ops = {
 	.show	= wmi_sysman_attr_show,
 	.store	= wmi_sysman_attr_store,
 };