Skip to content

Commit

Permalink
platform/x86/dell-wmi-sysman: Make some symbols static
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zou Wei authored and Hans de Goede committed Nov 3, 2020
1 parent 76adf0d commit 83f7a38
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ static ssize_t is_enabled_show(struct kobject *kobj, struct kobj_attribute *attr
return ret;
}

struct kobj_attribute po_is_pass_set =
__ATTR_RO(is_enabled);
static struct kobj_attribute po_is_pass_set = __ATTR_RO(is_enabled);

static ssize_t current_password_store(struct kobject *kobj,
struct kobj_attribute *attr,
Expand Down Expand Up @@ -67,8 +66,7 @@ static ssize_t current_password_store(struct kobject *kobj,
return count;
}

struct kobj_attribute po_current_password =
__ATTR_WO(current_password);
static struct kobj_attribute po_current_password = __ATTR_WO(current_password);

static ssize_t new_password_store(struct kobject *kobj,
struct kobj_attribute *attr,
Expand Down Expand Up @@ -96,25 +94,21 @@ static ssize_t new_password_store(struct kobject *kobj,
return ret ? ret : count;
}

struct kobj_attribute po_new_password =
__ATTR_WO(new_password);
static struct kobj_attribute po_new_password = __ATTR_WO(new_password);

attribute_n_property_show(min_password_length, po);
struct kobj_attribute po_min_pass_length =
__ATTR_RO(min_password_length);
static struct kobj_attribute po_min_pass_length = __ATTR_RO(min_password_length);

attribute_n_property_show(max_password_length, po);
struct kobj_attribute po_max_pass_length =
__ATTR_RO(max_password_length);
static struct kobj_attribute po_max_pass_length = __ATTR_RO(max_password_length);

static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
return sprintf(buf, "password\n");
}

struct kobj_attribute po_mechanism =
__ATTR_RO(mechanism);
static struct kobj_attribute po_mechanism = __ATTR_RO(mechanism);

static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
Expand All @@ -126,8 +120,7 @@ static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr,
return -EIO;
}

struct kobj_attribute po_role =
__ATTR_RO(role);
static struct kobj_attribute po_role = __ATTR_RO(role);

static struct attribute *po_attrs[] = {
&po_is_pass_set.attr,
Expand Down

0 comments on commit 83f7a38

Please sign in to comment.