All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static
@ 2023-03-14  0:51 Tom Rix
  2023-03-17  3:07 ` Martin K. Petersen
  2023-03-24 21:06 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-14  0:51 UTC (permalink / raw)
  To: ketan.mukadam, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, Tom Rix

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>
---
 drivers/scsi/be2iscsi/be_main.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 50a577ac3bb4..e3a07084c7e7 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -139,7 +139,7 @@ beiscsi_disp_param(_name)\
 beiscsi_change_param(_name, _minval, _maxval, _defval)\
 beiscsi_store_param(_name)\
 beiscsi_init_param(_name, _minval, _maxval, _defval)\
-DEVICE_ATTR(beiscsi_##_name, S_IRUGO | S_IWUSR,\
+static DEVICE_ATTR(beiscsi_##_name, S_IRUGO | S_IWUSR,\
 	      beiscsi_##_name##_disp, beiscsi_##_name##_store)
 
 /*
@@ -155,14 +155,14 @@ BEISCSI_RW_ATTR(log_enable, 0x00,
 		"\t\t\t\tConfiguration Path	: 0x20\n"
 		"\t\t\t\tiSCSI Protocol		: 0x40\n");
 
-DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL);
-DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL);
-DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL);
-DEVICE_ATTR(beiscsi_phys_port, S_IRUGO, beiscsi_phys_port_disp, NULL);
-DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO,
-	     beiscsi_active_session_disp, NULL);
-DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO,
-	     beiscsi_free_session_disp, NULL);
+static DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL);
+static DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL);
+static DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL);
+static DEVICE_ATTR(beiscsi_phys_port, S_IRUGO, beiscsi_phys_port_disp, NULL);
+static DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO,
+		   beiscsi_active_session_disp, NULL);
+static DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO,
+		   beiscsi_free_session_disp, NULL);
 
 static struct attribute *beiscsi_attrs[] = {
 	&dev_attr_beiscsi_log_enable.attr,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static
  2023-03-14  0:51 [PATCH] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static Tom Rix
@ 2023-03-17  3:07 ` Martin K. Petersen
  2023-03-24 21:06 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-03-17  3:07 UTC (permalink / raw)
  To: Tom Rix; +Cc: ketan.mukadam, jejb, martin.petersen, linux-scsi, linux-kernel


Tom,

> smatch reports several warnings

Applied to 6.4/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static
  2023-03-14  0:51 [PATCH] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static Tom Rix
  2023-03-17  3:07 ` Martin K. Petersen
@ 2023-03-24 21:06 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-03-24 21:06 UTC (permalink / raw)
  To: ketan.mukadam, jejb, Tom Rix
  Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Mon, 13 Mar 2023 20:51:57 -0400, Tom Rix wrote:

> 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 ?
> 
> [...]

Applied to 6.4/scsi-queue, thanks!

[1/1] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static
      https://git.kernel.org/mkp/scsi/c/1efbacd2b95a

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-24 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14  0:51 [PATCH] scsi: be2iscsi: set some be_main.c variables storage-class-specifier to static Tom Rix
2023-03-17  3:07 ` Martin K. Petersen
2023-03-24 21:06 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.