diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2016-03-28 14:13:16 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-03-29 20:29:55 -0400 |
commit | d78540dae77fd18e2eba57e5dc7021953f9506f4 (patch) | |
tree | 32be0f34ff491372471fa8150c060f8aafba3f7a | |
parent | ea76543127da32dec28af0a13ea1b06625fc085e (diff) |
scsi: Declare local symbols static
Avoid that building with W=1 causes gcc to report warnings about symbols
that have not been declared.
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 92ffd2406f97..2b642b145be1 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) | |||
81 | return name; | 81 | return name; |
82 | } | 82 | } |
83 | 83 | ||
84 | #ifdef CONFIG_SCSI_DH | ||
84 | static const struct { | 85 | static const struct { |
85 | unsigned char value; | 86 | unsigned char value; |
86 | char *name; | 87 | char *name; |
@@ -94,7 +95,7 @@ static const struct { | |||
94 | { SCSI_ACCESS_STATE_TRANSITIONING, "transitioning" }, | 95 | { SCSI_ACCESS_STATE_TRANSITIONING, "transitioning" }, |
95 | }; | 96 | }; |
96 | 97 | ||
97 | const char *scsi_access_state_name(unsigned char state) | 98 | static const char *scsi_access_state_name(unsigned char state) |
98 | { | 99 | { |
99 | int i; | 100 | int i; |
100 | char *name = NULL; | 101 | char *name = NULL; |
@@ -107,6 +108,7 @@ const char *scsi_access_state_name(unsigned char state) | |||
107 | } | 108 | } |
108 | return name; | 109 | return name; |
109 | } | 110 | } |
111 | #endif | ||
110 | 112 | ||
111 | static int check_set(unsigned long long *val, char *src) | 113 | static int check_set(unsigned long long *val, char *src) |
112 | { | 114 | { |
@@ -226,7 +228,7 @@ show_shost_state(struct device *dev, struct device_attribute *attr, char *buf) | |||
226 | } | 228 | } |
227 | 229 | ||
228 | /* DEVICE_ATTR(state) clashes with dev_attr_state for sdev */ | 230 | /* DEVICE_ATTR(state) clashes with dev_attr_state for sdev */ |
229 | struct device_attribute dev_attr_hstate = | 231 | static struct device_attribute dev_attr_hstate = |
230 | __ATTR(state, S_IRUGO | S_IWUSR, show_shost_state, store_shost_state); | 232 | __ATTR(state, S_IRUGO | S_IWUSR, show_shost_state, store_shost_state); |
231 | 233 | ||
232 | static ssize_t | 234 | static ssize_t |
@@ -401,7 +403,7 @@ static struct attribute *scsi_sysfs_shost_attrs[] = { | |||
401 | NULL | 403 | NULL |
402 | }; | 404 | }; |
403 | 405 | ||
404 | struct attribute_group scsi_shost_attr_group = { | 406 | static struct attribute_group scsi_shost_attr_group = { |
405 | .attrs = scsi_sysfs_shost_attrs, | 407 | .attrs = scsi_sysfs_shost_attrs, |
406 | }; | 408 | }; |
407 | 409 | ||