Skip to contentSkip to conversation

scsi: fix sparse warnings

PATCH In review Lad Prabhakar 2 participants 2 messages Feb 5, 2015 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fix sparse warnings

From: "Lad, Prabhakar" <[email protected]>

this patch fixes following sparse warnings:
scsi_sysfs.c:201:25: warning: symbol 'dev_attr_hstate' was not declared. Should it be static? scsi_sysfs.c:376:24: warning: symbol 'scsi_shost_attr_group' was not declared. Should it be static?

---
 drivers/scsi/scsi_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/scsi_sysfs.c +2 -2
index 1ac38e7..0eac0f7 100644
@@ -198,7 +198,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
@@ -373,7 +373,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,
 };
 
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Lad Prabhakar

this patch fixes following sparse warnings:
scsi_sysfs.c:201:25: warning: symbol 'dev_attr_hstate' was not declared. Should it be static? scsi_sysfs.c:376:24: warning: symbol 'scsi_shost_attr_group' was not declared. Should it be static?