All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static
@ 2021-10-19 10:27 Jiapeng Chong
  2021-10-19 16:36 ` Bart Van Assche
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jiapeng Chong @ 2021-10-19 10:27 UTC (permalink / raw)
  To: sathya.prakash
  Cc: sreekanth.reddy, suganath-prabu.subramani, jejb, martin.petersen,
	MPT-FusionLinux.pdl, linux-scsi, linux-kernel, chongjiapeng

From: chongjiapeng <jiapeng.chong@linux.alibaba.com>

This symbol is not used outside of mpt3sas_ctl.c, so marks it static.

Fixes the following sparse warning:

drivers/scsi/mpt3sas/mpt3sas_ctl.c:3988:18: warning: symbol
'mpt3sas_dev_attrs' was not declared. Should it be static?

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 1bb3ca27d2ca ("scsi: mpt3sas: Switch to attribute groups")
Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
---
 drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 0aabc9761be1..05b6c6a073c3 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -3985,7 +3985,7 @@ sas_ncq_prio_enable_store(struct device *dev,
 }
 static DEVICE_ATTR_RW(sas_ncq_prio_enable);
 
-struct attribute *mpt3sas_dev_attrs[] = {
+static struct attribute *mpt3sas_dev_attrs[] = {
 	&dev_attr_sas_address.attr,
 	&dev_attr_sas_device_handle.attr,
 	&dev_attr_sas_ncq_prio_supported.attr,
-- 
2.19.1.6.gb485710b


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

* Re: [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static
  2021-10-19 10:27 [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static Jiapeng Chong
@ 2021-10-19 16:36 ` Bart Van Assche
  2021-10-20  1:58 ` Himanshu Madhani
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2021-10-19 16:36 UTC (permalink / raw)
  To: Jiapeng Chong, sathya.prakash
  Cc: sreekanth.reddy, suganath-prabu.subramani, jejb, martin.petersen,
	MPT-FusionLinux.pdl, linux-scsi, linux-kernel

On 10/19/21 3:27 AM, Jiapeng Chong wrote:
> From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> 
> This symbol is not used outside of mpt3sas_ctl.c, so marks it static.
> 
> Fixes the following sparse warning:
> 
> drivers/scsi/mpt3sas/mpt3sas_ctl.c:3988:18: warning: symbol
> 'mpt3sas_dev_attrs' was not declared. Should it be static?
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 1bb3ca27d2ca ("scsi: mpt3sas: Switch to attribute groups")
> Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> ---
>   drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> index 0aabc9761be1..05b6c6a073c3 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> @@ -3985,7 +3985,7 @@ sas_ncq_prio_enable_store(struct device *dev,
>   }
>   static DEVICE_ATTR_RW(sas_ncq_prio_enable);
>   
> -struct attribute *mpt3sas_dev_attrs[] = {
> +static struct attribute *mpt3sas_dev_attrs[] = {
>   	&dev_attr_sas_address.attr,
>   	&dev_attr_sas_device_handle.attr,
>   	&dev_attr_sas_ncq_prio_supported.attr,
> 

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

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

* Re: [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static
  2021-10-19 10:27 [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static Jiapeng Chong
  2021-10-19 16:36 ` Bart Van Assche
@ 2021-10-20  1:58 ` Himanshu Madhani
  2021-10-21  2:58 ` Martin K. Petersen
  2021-10-27  4:00 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Himanshu Madhani @ 2021-10-20  1:58 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: sathya.prakash, sreekanth.reddy, suganath-prabu.subramani,
	James E . J . Bottomley, Martin Petersen, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel



> On Oct 19, 2021, at 5:27 AM, Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> 
> From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> 
> This symbol is not used outside of mpt3sas_ctl.c, so marks it static.
> 
> Fixes the following sparse warning:
> 
> drivers/scsi/mpt3sas/mpt3sas_ctl.c:3988:18: warning: symbol
> 'mpt3sas_dev_attrs' was not declared. Should it be static?
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 1bb3ca27d2ca ("scsi: mpt3sas: Switch to attribute groups")
> Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> index 0aabc9761be1..05b6c6a073c3 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> @@ -3985,7 +3985,7 @@ sas_ncq_prio_enable_store(struct device *dev,
> }
> static DEVICE_ATTR_RW(sas_ncq_prio_enable);
> 
> -struct attribute *mpt3sas_dev_attrs[] = {
> +static struct attribute *mpt3sas_dev_attrs[] = {
> 	&dev_attr_sas_address.attr,
> 	&dev_attr_sas_device_handle.attr,
> 	&dev_attr_sas_ncq_prio_supported.attr,
> -- 
> 2.19.1.6.gb485710b
> 

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

--
Himanshu Madhani	 Oracle Linux Engineering


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

* Re: [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static
  2021-10-19 10:27 [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static Jiapeng Chong
  2021-10-19 16:36 ` Bart Van Assche
  2021-10-20  1:58 ` Himanshu Madhani
@ 2021-10-21  2:58 ` Martin K. Petersen
  2021-10-27  4:00 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-10-21  2:58 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: sathya.prakash, sreekanth.reddy, suganath-prabu.subramani, jejb,
	martin.petersen, MPT-FusionLinux.pdl, linux-scsi, linux-kernel


Jiapeng,

> This symbol is not used outside of mpt3sas_ctl.c, so marks it static.

Applied to 5.16/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static
  2021-10-19 10:27 [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static Jiapeng Chong
                   ` (2 preceding siblings ...)
  2021-10-21  2:58 ` Martin K. Petersen
@ 2021-10-27  4:00 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-10-27  4:00 UTC (permalink / raw)
  To: sathya.prakash, Jiapeng Chong
  Cc: Martin K . Petersen, linux-kernel, linux-scsi, sreekanth.reddy,
	jejb, suganath-prabu.subramani, MPT-FusionLinux.pdl

On Tue, 19 Oct 2021 18:27:19 +0800, Jiapeng Chong wrote:

> From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> 
> This symbol is not used outside of mpt3sas_ctl.c, so marks it static.
> 
> Fixes the following sparse warning:
> 
> drivers/scsi/mpt3sas/mpt3sas_ctl.c:3988:18: warning: symbol
> 'mpt3sas_dev_attrs' was not declared. Should it be static?
> 
> [...]

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: mpt3sas: make mpt3sas_dev_attrs static
      https://git.kernel.org/mkp/scsi/c/0ae8f4785107

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-10-27  4:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 10:27 [PATCH] scsi: mpt3sas: make mpt3sas_dev_attrs static Jiapeng Chong
2021-10-19 16:36 ` Bart Van Assche
2021-10-20  1:58 ` Himanshu Madhani
2021-10-21  2:58 ` Martin K. Petersen
2021-10-27  4:00 ` 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.