diff mbox series

[v2,6/7] qla2xxx: define static symbols

Message ID 20220826102559.17474-7-njavali@marvell.com
State New
Headers show
Series qla2xxx driver features | expand

Commit Message

Nilesh Javali Aug. 26, 2022, 10:25 a.m. UTC
drivers/scsi/qla2xxx/qla_os.c:40:20: warning: symbol 'qla_trc_array'
was not declared. Should it be static?
drivers/scsi/qla2xxx/qla_os.c:345:5: warning: symbol
'ql2xdelay_before_pci_error_handling' was not declared.
Should it be static?

Define qla_trc_array and ql2xdelay_before_pci_error_handling
as static to fix sparse warnings.

Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Himanshu Madhani Aug. 29, 2022, 4:25 p.m. UTC | #1
> On Aug 26, 2022, at 3:25 AM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> drivers/scsi/qla2xxx/qla_os.c:40:20: warning: symbol 'qla_trc_array'
> was not declared. Should it be static?
> drivers/scsi/qla2xxx/qla_os.c:345:5: warning: symbol
> 'ql2xdelay_before_pci_error_handling' was not declared.
> Should it be static?
> 
> Define qla_trc_array and ql2xdelay_before_pci_error_handling
> as static to fix sparse warnings.
> 
> Cc: stable@vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_os.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 4a55c1e81327..46c281b55c63 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -37,7 +37,7 @@ static int apidev_major;
>  */
> struct kmem_cache *srb_cachep;
> 
> -struct trace_array *qla_trc_array;
> +static struct trace_array *qla_trc_array;
> 
> int ql2xfulldump_on_mpifail;
> module_param(ql2xfulldump_on_mpifail, int, S_IRUGO | S_IWUSR);
> @@ -342,7 +342,7 @@ MODULE_PARM_DESC(ql2xabts_wait_nvme,
> 		 "To wait for ABTS response on I/O timeouts for NVMe. (default: 1)");
> 
> 
> -u32 ql2xdelay_before_pci_error_handling = 5;
> +static u32 ql2xdelay_before_pci_error_handling = 5;
> module_param(ql2xdelay_before_pci_error_handling, uint, 0644);
> MODULE_PARM_DESC(ql2xdelay_before_pci_error_handling,
> 	"Number of seconds delayed before qla begin PCI error self-handling (default: 5).\n");
> -- 
> 2.19.0.rc0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 4a55c1e81327..46c281b55c63 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -37,7 +37,7 @@  static int apidev_major;
  */
 struct kmem_cache *srb_cachep;
 
-struct trace_array *qla_trc_array;
+static struct trace_array *qla_trc_array;
 
 int ql2xfulldump_on_mpifail;
 module_param(ql2xfulldump_on_mpifail, int, S_IRUGO | S_IWUSR);
@@ -342,7 +342,7 @@  MODULE_PARM_DESC(ql2xabts_wait_nvme,
 		 "To wait for ABTS response on I/O timeouts for NVMe. (default: 1)");
 
 
-u32 ql2xdelay_before_pci_error_handling = 5;
+static u32 ql2xdelay_before_pci_error_handling = 5;
 module_param(ql2xdelay_before_pci_error_handling, uint, 0644);
 MODULE_PARM_DESC(ql2xdelay_before_pci_error_handling,
 	"Number of seconds delayed before qla begin PCI error self-handling (default: 5).\n");