All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next v2] scsi: mpi3mr: Make some symbols static
@ 2021-06-04  7:14 Yang Yingliang
  2021-06-16 13:47 ` Kashyap Desai
  2021-06-19  2:05 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2021-06-04  7:14 UTC (permalink / raw)
  To: linux-kernel, linux-scsi; +Cc: jejb, martin.petersen

Fix the following warnings:

  drivers/scsi/mpi3mr/mpi3mr_os.c:24:5: warning: symbol 'prot_mask' was not declared. Should it be static?
  drivers/scsi/mpi3mr/mpi3mr_os.c:28:5: warning: symbol 'prot_guard_mask' was not declared. Should it be static?
  drivers/scsi/mpi3mr/mpi3mr_os.c:31:5: warning: symbol 'logging_level' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
v2:
  move extern int prot_mask to mpi3mr.h
---
 drivers/scsi/mpi3mr/mpi3mr.h    | 1 +
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 1 -
 drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
index 5d5529167350..6f5dc9e78553 100644
--- a/drivers/scsi/mpi3mr/mpi3mr.h
+++ b/drivers/scsi/mpi3mr/mpi3mr.h
@@ -50,6 +50,7 @@
 /* Global list and lock for storing multiple adapters managed by the driver */
 extern spinlock_t mrioc_list_lock;
 extern struct list_head mrioc_list;
+extern int prot_mask;
 
 #define MPI3MR_DRIVER_VERSION	"00.255.45.01"
 #define MPI3MR_DRIVER_RELDATE	"12-December-2020"
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 8aea1c2ae712..4a007cf54ad7 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -9,7 +9,6 @@
 
 #include "mpi3mr.h"
 #include <linux/io-64-nonatomic-lo-hi.h>
-extern int prot_mask;
 
 #if defined(writeq) && defined(CONFIG_64BIT)
 static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index a54aa009ec5a..eec0b269a4db 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -25,10 +25,10 @@ int prot_mask = -1;
 module_param(prot_mask, int, 0);
 MODULE_PARM_DESC(prot_mask, "Host protection capabilities mask, def=0x07");
 
-int prot_guard_mask = 3;
+static int prot_guard_mask = 3;
 module_param(prot_guard_mask, int, 0);
 MODULE_PARM_DESC(prot_guard_mask, " Host protection guard mask, def=3");
-int logging_level;
+static int logging_level;
 module_param(logging_level, int, 0);
 MODULE_PARM_DESC(logging_level,
 	" bits for enabling additional logging info (default=0)");
-- 
2.25.1


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

* Re: [PATCH -next v2] scsi: mpi3mr: Make some symbols static
  2021-06-04  7:14 [PATCH -next v2] scsi: mpi3mr: Make some symbols static Yang Yingliang
@ 2021-06-16 13:47 ` Kashyap Desai
  2021-06-19  2:05 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Kashyap Desai @ 2021-06-16 13:47 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: linux-kernel, linux-scsi, James E . J . Bottomley, Martin K. Petersen

[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]

> Fix the following warnings:
>
>   drivers/scsi/mpi3mr/mpi3mr_os.c:24:5: warning: symbol 'prot_mask' was not declared. Should it be static?
>   drivers/scsi/mpi3mr/mpi3mr_os.c:28:5: warning: symbol 'prot_guard_mask' was not declared. Should it be static?
>   drivers/scsi/mpi3mr/mpi3mr_os.c:31:5: warning: symbol 'logging_level' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> v2:
>   move extern int prot_mask to mpi3mr.h
> ---
>  drivers/scsi/mpi3mr/mpi3mr.h    | 1 +
>  drivers/scsi/mpi3mr/mpi3mr_fw.c | 1 -
>  drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++--
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
> index 5d5529167350..6f5dc9e78553 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr.h
> +++ b/drivers/scsi/mpi3mr/mpi3mr.h
> @@ -50,6 +50,7 @@
>  /* Global list and lock for storing multiple adapters managed by the driver */
>  extern spinlock_t mrioc_list_lock;
>  extern struct list_head mrioc_list;
> +extern int prot_mask;
>
>  #define MPI3MR_DRIVER_VERSION  "00.255.45.01"
>  #define MPI3MR_DRIVER_RELDATE  "12-December-2020"
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> index 8aea1c2ae712..4a007cf54ad7 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> @@ -9,7 +9,6 @@
>
>  #include "mpi3mr.h"
>  #include <linux/io-64-nonatomic-lo-hi.h>
> -extern int prot_mask;
>
>  #if defined(writeq) && defined(CONFIG_64BIT)
>  static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr)
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
> index a54aa009ec5a..eec0b269a4db 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_os.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
> @@ -25,10 +25,10 @@ int prot_mask = -1;
>  module_param(prot_mask, int, 0);
>  MODULE_PARM_DESC(prot_mask, "Host protection capabilities mask, def=0x07");
>
> -int prot_guard_mask = 3;
> +static int prot_guard_mask = 3;
>  module_param(prot_guard_mask, int, 0);
>  MODULE_PARM_DESC(prot_guard_mask, " Host protection guard mask, def=3");
> -int logging_level;
> +static int logging_level;
>  module_param(logging_level, int, 0);
>  MODULE_PARM_DESC(logging_level,
>         " bits for enabling additional logging info (default=0)");

Acked-by: Kashyap Desai <kashyap.desai@broadcom.com>
> --
> 2.25.1
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

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

* Re: [PATCH -next v2] scsi: mpi3mr: Make some symbols static
  2021-06-04  7:14 [PATCH -next v2] scsi: mpi3mr: Make some symbols static Yang Yingliang
  2021-06-16 13:47 ` Kashyap Desai
@ 2021-06-19  2:05 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-06-19  2:05 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, linux-scsi, jejb, martin.petersen


Yang,

> Fix the following warnings:
>
>   drivers/scsi/mpi3mr/mpi3mr_os.c:24:5: warning: symbol 'prot_mask' was not declared. Should it be static?
>   drivers/scsi/mpi3mr/mpi3mr_os.c:28:5: warning: symbol 'prot_guard_mask' was not declared. Should it be static?
>   drivers/scsi/mpi3mr/mpi3mr_os.c:31:5: warning: symbol 'logging_level' was not declared. Should it be static?

Applied to 5.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-06-19  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04  7:14 [PATCH -next v2] scsi: mpi3mr: Make some symbols static Yang Yingliang
2021-06-16 13:47 ` Kashyap Desai
2021-06-19  2:05 ` 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.