Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86/dell-wmi-sysman: Make some symbols static

Fix the following sparse warnings:

./passobj-attributes.c:38:23: warning: symbol 'po_is_pass_set' was not declared. Should it be static?
./passobj-attributes.c:70:23: warning: symbol 'po_current_password' was not declared. Should it be static?
./passobj-attributes.c:99:23: warning: symbol 'po_new_password' was not declared. Should it be static?
./passobj-attributes.c:103:23: warning: symbol 'po_min_pass_length' was not declared. Should it be static?
./passobj-attributes.c:107:23: warning: symbol 'po_max_pass_length' was not declared. Should it be static?
./passobj-attributes.c:116:23: warning: symbol 'po_mechanism' was not declared. Should it be static?
./passobj-attributes.c:129:23: warning: symbol 'po_role' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Link: https://lore.kernel.org/r/1604107922-14950-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Zou Wei and committed by
Hans de Goede
83f7a38e 76adf0df

+7 -14
+7 -14
drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c
··· 35 35 return ret; 36 36 } 37 37 38 - struct kobj_attribute po_is_pass_set = 39 - __ATTR_RO(is_enabled); 38 + static struct kobj_attribute po_is_pass_set = __ATTR_RO(is_enabled); 40 39 41 40 static ssize_t current_password_store(struct kobject *kobj, 42 41 struct kobj_attribute *attr, ··· 66 67 return count; 67 68 } 68 69 69 - struct kobj_attribute po_current_password = 70 - __ATTR_WO(current_password); 70 + static struct kobj_attribute po_current_password = __ATTR_WO(current_password); 71 71 72 72 static ssize_t new_password_store(struct kobject *kobj, 73 73 struct kobj_attribute *attr, ··· 94 96 return ret ? ret : count; 95 97 } 96 98 97 - struct kobj_attribute po_new_password = 98 - __ATTR_WO(new_password); 99 + static struct kobj_attribute po_new_password = __ATTR_WO(new_password); 99 100 100 101 attribute_n_property_show(min_password_length, po); 101 - struct kobj_attribute po_min_pass_length = 102 - __ATTR_RO(min_password_length); 102 + static struct kobj_attribute po_min_pass_length = __ATTR_RO(min_password_length); 103 103 104 104 attribute_n_property_show(max_password_length, po); 105 - struct kobj_attribute po_max_pass_length = 106 - __ATTR_RO(max_password_length); 105 + static struct kobj_attribute po_max_pass_length = __ATTR_RO(max_password_length); 107 106 108 107 static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr, 109 108 char *buf) ··· 108 113 return sprintf(buf, "password\n"); 109 114 } 110 115 111 - struct kobj_attribute po_mechanism = 112 - __ATTR_RO(mechanism); 116 + static struct kobj_attribute po_mechanism = __ATTR_RO(mechanism); 113 117 114 118 static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr, 115 119 char *buf) ··· 120 126 return -EIO; 121 127 } 122 128 123 - struct kobj_attribute po_role = 124 - __ATTR_RO(role); 129 + static struct kobj_attribute po_role = __ATTR_RO(role); 125 130 126 131 static struct attribute *po_attrs[] = { 127 132 &po_is_pass_set.attr,