All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zou Wei <zou_wei@huawei.com>
To: <hdegoede@redhat.com>, <mgross@linux.intel.com>
Cc: <platform-driver-x86@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, "Zou Wei" <zou_wei@huawei.com>
Subject: [PATCH -next] platform/x86/dell-wmi-sysman: Make some symbols static
Date: Thu, 29 Oct 2020 19:34:09 +0800	[thread overview]
Message-ID: <1603971249-64044-1-git-send-email-zou_wei@huawei.com> (raw)

Fix the following sparse warnings:

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

po_is_pass_set, po_current_password, po_new_password, 
po_min_pass_length, po_max_pass_length, po_mechanism and po_role
have only call within passobj-attributes.c
They should be static

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c b/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c
index e6199fb..81562b1 100644
--- a/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c
+++ b/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c
@@ -35,7 +35,7 @@ static ssize_t is_enabled_show(struct kobject *kobj, struct kobj_attribute *attr
 	return ret;
 }
 
-struct kobj_attribute po_is_pass_set =
+static struct kobj_attribute po_is_pass_set =
 		__ATTR_RO(is_enabled);
 
 static ssize_t current_password_store(struct kobject *kobj,
@@ -67,7 +67,7 @@ static ssize_t current_password_store(struct kobject *kobj,
 	return count;
 }
 
-struct kobj_attribute po_current_password =
+static struct kobj_attribute po_current_password =
 		__ATTR_WO(current_password);
 
 static ssize_t new_password_store(struct kobject *kobj,
@@ -96,15 +96,15 @@ static ssize_t new_password_store(struct kobject *kobj,
 	return ret ? ret : count;
 }
 
-struct kobj_attribute po_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 =
+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 =
+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,
@@ -113,7 +113,7 @@ static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr,
 	return sprintf(buf, "password\n");
 }
 
-struct kobj_attribute po_mechanism =
+static struct kobj_attribute po_mechanism =
 	__ATTR_RO(mechanism);
 
 static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr,
@@ -126,7 +126,7 @@ static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr,
 	return -EIO;
 }
 
-struct kobj_attribute po_role =
+static struct kobj_attribute po_role =
 	__ATTR_RO(role);
 
 static struct attribute *po_attrs[] = {
-- 
2.6.2


             reply	other threads:[~2020-10-29 11:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 11:34 Zou Wei [this message]
2020-10-29 11:54 ` [PATCH -next] platform/x86/dell-wmi-sysman: Make some symbols static Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1603971249-64044-1-git-send-email-zou_wei@huawei.com \
    --to=zou_wei@huawei.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.