Skip to contentSkip to conversation

scsi: mpt3sas: make mpt3sas_dev_attrs static

PATCH Applied Jiapeng Chong 4 participants 5 messages Oct 19, 2021 – Oct 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: mpt3sas: make mpt3sas_dev_attrs static

From: chongjiapeng <[email protected]>

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?

Fixes 1bb3ca27d2ca ("scsi: mpt3sas: Switch to attribute groups")
---
 drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_ctl.c +1 -1
index 0aabc9761be1..05b6c6a073c3 100644
@@ -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,
Signature · 1 line
2.19.1.6.gb485710b
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Jiapeng Chong

From: chongjiapeng <[email protected]>

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?

Fixes 1bb3ca27d2ca ("scsi: mpt3sas: Switch to attribute groups")
---
  drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_ctl.c +0 -0
index 0aabc9761be1..05b6c6a073c3 100644

drivers/scsi/mpt3sas/mpt3sas_ctl.c sas_ncq_prio_enable_store(struct device *dev, · line 3991

Quoted 8 lines
drivers/scsi/mpt3sas/mpt3sas_ctl.c +1 -1
@@ -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 on v1 1/1
#2 lore raw
In reply to Jiapeng Chong
Quoted 36 lines · Jiapeng Chong

From: chongjiapeng <[email protected]>

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?

Fixes 1bb3ca27d2ca ("scsi: mpt3sas: Switch to attribute groups")

---
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_ctl.c +1 -1
index 0aabc9761be1..05b6c6a073c3 100644
@@ -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,
Signature · 1 line
2.19.1.6.gb485710b

--
Himanshu Madhani Oracle Linux Engineering

#3 lore raw
In reply to Jiapeng Chong

Jiapeng,

Quoted 1 line

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

Applied to 5.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#4 lore raw
In reply to Jiapeng Chong
Quoted 10 lines · Jiapeng Chong

From: chongjiapeng <[email protected]>

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
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering