Skip to content

Commit 1efbacd

Browse files
Tom Rixmartinkpetersen
authored andcommitted
scsi: be2iscsi: Make some variables static
smatch reports several warnings: drivers/scsi/be2iscsi/be_main.c:148:1: warning: symbol 'dev_attr_beiscsi_log_enable' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:158:1: warning: symbol 'dev_attr_beiscsi_drvr_ver' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:159:1: warning: symbol 'dev_attr_beiscsi_adapter_family' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:160:1: warning: symbol 'dev_attr_beiscsi_fw_ver' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:161:1: warning: symbol 'dev_attr_beiscsi_phys_port' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:162:1: warning: symbol 'dev_attr_beiscsi_active_session_count' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:164:1: warning: symbol 'dev_attr_beiscsi_free_session_count' was not declared. Should it be static ? These variables are only used in be_main.c, so should be static. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20230314005157.536918-1-trix@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 0b31b77 commit 1efbacd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/scsi/be2iscsi/be_main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ beiscsi_disp_param(_name)\
139139
beiscsi_change_param(_name, _minval, _maxval, _defval)\
140140
beiscsi_store_param(_name)\
141141
beiscsi_init_param(_name, _minval, _maxval, _defval)\
142-
DEVICE_ATTR(beiscsi_##_name, S_IRUGO | S_IWUSR,\
142+
static DEVICE_ATTR(beiscsi_##_name, S_IRUGO | S_IWUSR,\
143143
beiscsi_##_name##_disp, beiscsi_##_name##_store)
144144

145145
/*
@@ -155,14 +155,14 @@ BEISCSI_RW_ATTR(log_enable, 0x00,
155155
"\t\t\t\tConfiguration Path : 0x20\n"
156156
"\t\t\t\tiSCSI Protocol : 0x40\n");
157157

158-
DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL);
159-
DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL);
160-
DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL);
161-
DEVICE_ATTR(beiscsi_phys_port, S_IRUGO, beiscsi_phys_port_disp, NULL);
162-
DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO,
163-
beiscsi_active_session_disp, NULL);
164-
DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO,
165-
beiscsi_free_session_disp, NULL);
158+
static DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL);
159+
static DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL);
160+
static DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL);
161+
static DEVICE_ATTR(beiscsi_phys_port, S_IRUGO, beiscsi_phys_port_disp, NULL);
162+
static DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO,
163+
beiscsi_active_session_disp, NULL);
164+
static DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO,
165+
beiscsi_free_session_disp, NULL);
166166

167167
static struct attribute *beiscsi_attrs[] = {
168168
&dev_attr_beiscsi_log_enable.attr,

0 commit comments

Comments
 (0)