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>
static const struct {
unsigned char value;
char *name;
static const struct {
unsigned char value;
char *name;
{ SCSI_ACCESS_STATE_TRANSITIONING, "transitioning" },
};
{ 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;
{
int i;
char *name = NULL;
static int check_set(unsigned long long *val, char *src)
{
static int check_set(unsigned long long *val, char *src)
{
}
/* DEVICE_ATTR(state) clashes with dev_attr_state for sdev */
}
/* 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
__ATTR(state, S_IRUGO | S_IWUSR, show_shost_state, store_shost_state);
static ssize_t
-struct attribute_group scsi_shost_attr_group = {
+static struct attribute_group scsi_shost_attr_group = {
.attrs = scsi_sysfs_shost_attrs,
};
.attrs = scsi_sysfs_shost_attrs,
};