From: Bart Van Assche <bart.vanassche@sandisk.com>
To: James Bottomley <james.bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>,
Christoph Hellwig <hch@infradead.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: [PATCH 1/2] Declare local symbols static
Date: Mon, 28 Mar 2016 11:13:16 -0700 [thread overview]
Message-ID: <56F9743C.8040301@sandisk.com> (raw)
In-Reply-To: <56F9740A.4060100@sandisk.com>
Avoid that building with W=1 causes gcc to report warnings about
symbols that have not been declared.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/scsi_sysfs.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 92ffd24..2b642b1 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -81,6 +81,7 @@ const char *scsi_host_state_name(enum scsi_host_state state)
return name;
}
+#ifdef CONFIG_SCSI_DH
static const struct {
unsigned char value;
char *name;
@@ -94,7 +95,7 @@ static const struct {
{ SCSI_ACCESS_STATE_TRANSITIONING, "transitioning" },
};
-const char *scsi_access_state_name(unsigned char state)
+static const char *scsi_access_state_name(unsigned char state)
{
int i;
char *name = NULL;
@@ -107,6 +108,7 @@ const char *scsi_access_state_name(unsigned char state)
}
return name;
}
+#endif
static int check_set(unsigned long long *val, char *src)
{
@@ -226,7 +228,7 @@ show_shost_state(struct device *dev, struct device_attribute *attr, char *buf)
}
/* DEVICE_ATTR(state) clashes with dev_attr_state for sdev */
-struct device_attribute dev_attr_hstate =
+static struct device_attribute dev_attr_hstate =
__ATTR(state, S_IRUGO | S_IWUSR, show_shost_state, store_shost_state);
static ssize_t
@@ -401,7 +403,7 @@ static struct attribute *scsi_sysfs_shost_attrs[] = {
NULL
};
-struct attribute_group scsi_shost_attr_group = {
+static struct attribute_group scsi_shost_attr_group = {
.attrs = scsi_sysfs_shost_attrs,
};
--
2.7.3
next prev parent reply other threads:[~2016-03-28 18:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 18:12 [PATCH 0/2] scsi_dh_alua fixes for kernel v4.6 Bart Van Assche
2016-03-28 18:13 ` Bart Van Assche [this message]
2016-03-29 6:41 ` [PATCH 1/2] Declare local symbols static Hannes Reinecke
2016-03-29 7:33 ` Christoph Hellwig
2016-03-29 14:55 ` Ewan D. Milne
2016-03-28 18:14 ` [PATCH 2/2] scsi_dh_alua: Fix a recently introduced deadlock Bart Van Assche
2016-03-28 18:21 ` Laurence Oberman
2016-03-29 6:41 ` Hannes Reinecke
2016-03-29 7:34 ` Christoph Hellwig
2016-03-29 14:55 ` Ewan D. Milne
2016-03-30 0:33 ` [PATCH 0/2] scsi_dh_alua fixes for kernel v4.6 Martin K. Petersen
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=56F9743C.8040301@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox