LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] scsi: fix sparse warnings
@ 2015-02-05 9:41 Lad Prabhakar
2015-02-05 11:38 ` Bart Van Assche
0 siblings, 1 reply; 2+ messages in thread
From: Lad Prabhakar @ 2015-02-05 9:41 UTC (permalink / raw)
To: James E.J. Bottomley, linux-scsi; +Cc: linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
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?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
drivers/scsi/scsi_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 1ac38e7..0eac0f7 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -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,
};
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: fix sparse warnings
2015-02-05 9:41 [PATCH] scsi: fix sparse warnings Lad Prabhakar
@ 2015-02-05 11:38 ` Bart Van Assche
0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2015-02-05 11:38 UTC (permalink / raw)
To: Lad Prabhakar, James E.J. Bottomley, linux-scsi; +Cc: linux-kernel
On 02/05/15 10:41, Lad Prabhakar wrote:
> 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?
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-05 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 9:41 [PATCH] scsi: fix sparse warnings Lad Prabhakar
2015-02-05 11:38 ` Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).