diff mbox series

scsi: megaraid: make smp_affinity_enable static

Message ID 20200915083948.2826598-1-yanaijie@huawei.com (mailing list archive)
State Accepted
Headers show
Series scsi: megaraid: make smp_affinity_enable static | expand

Commit Message

Jason Yan Sept. 15, 2020, 8:39 a.m. UTC
This addresses the following sparse warning:

drivers/scsi/megaraid/megaraid_sas_base.c:80:5: warning: symbol
'smp_affinity_enable' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Damien Le Moal Sept. 15, 2020, 9:22 a.m. UTC | #1
On 2020/09/15 17:38, Jason Yan wrote:
> This addresses the following sparse warning:
> 
> drivers/scsi/megaraid/megaraid_sas_base.c:80:5: warning: symbol
> 'smp_affinity_enable' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 2b7e7b5f38ed..e158d3d62056 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -77,7 +77,7 @@ unsigned int resetwaittime = MEGASAS_RESET_WAIT_TIME;
>  module_param(resetwaittime, int, 0444);
>  MODULE_PARM_DESC(resetwaittime, "Wait time in (1-180s) after I/O timeout before resetting adapter. Default: 180s");
>  
> -int smp_affinity_enable = 1;
> +static int smp_affinity_enable = 1;
>  module_param(smp_affinity_enable, int, 0444);
>  MODULE_PARM_DESC(smp_affinity_enable, "SMP affinity feature enable/disable Default: enable(1)");

Looks good.
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Martin K. Petersen Sept. 15, 2020, 10:08 p.m. UTC | #2
Jason,

> This addresses the following sparse warning:
>
> drivers/scsi/megaraid/megaraid_sas_base.c:80:5: warning: symbol
> 'smp_affinity_enable' was not declared. Should it be static?

Applied to 5.10/scsi-staging, thanks!
Martin K. Petersen Sept. 22, 2020, 3:57 a.m. UTC | #3
On Tue, 15 Sep 2020 16:39:48 +0800, Jason Yan wrote:

> This addresses the following sparse warning:
> 
> drivers/scsi/megaraid/megaraid_sas_base.c:80:5: warning: symbol
> 'smp_affinity_enable' was not declared. Should it be static?

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: megaraid: Make smp_affinity_enable static
      https://git.kernel.org/mkp/scsi/c/62aa501dc9dd
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 2b7e7b5f38ed..e158d3d62056 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -77,7 +77,7 @@  unsigned int resetwaittime = MEGASAS_RESET_WAIT_TIME;
 module_param(resetwaittime, int, 0444);
 MODULE_PARM_DESC(resetwaittime, "Wait time in (1-180s) after I/O timeout before resetting adapter. Default: 180s");
 
-int smp_affinity_enable = 1;
+static int smp_affinity_enable = 1;
 module_param(smp_affinity_enable, int, 0444);
 MODULE_PARM_DESC(smp_affinity_enable, "SMP affinity feature enable/disable Default: enable(1)");