Skip to contentSkip to conversation

scsi: ata: make ahci_sdev_attrs static

PATCH In review Jiapeng Chong 3 participants 6 messages Oct 19, 2021 – Oct 21, 2021

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

PATCH 1/1 scsi: ata: make ahci_sdev_attrs static

From: chongjiapeng <[email protected]>

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

Fix the following sparse warning:

drivers/ata/libahci.c:134:18: warning: symbol 'ahci_sdev_attrs' was not declared. Should it be static?

Fixes c3f69c7f629f ("scsi: ata: Switch to attribute groups")
---
 drivers/ata/libahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +1 -1
index 28430c093a7f..8a6835bfd18a 100644
@@ -131,7 +131,7 @@ const struct attribute_group *ahci_shost_groups[] = {
 };
 EXPORT_SYMBOL_GPL(ahci_shost_groups);
 
-struct attribute *ahci_sdev_attrs[] = {
+static struct attribute *ahci_sdev_attrs[] = {
 	&dev_attr_sw_activity.attr,
 	&dev_attr_unload_heads.attr,
 	&dev_attr_ncq_prio_supported.attr,
Signature · 1 line
2.19.1.6.gb485710b
#1 lore raw

+Bart

Quoted 1 line · Jiapeng Chong

From: chongjiapeng <[email protected]>

The patch title should be:

ata: libahci: make ahci_sdev_attrs static

Quoted 21 lines

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

Fix the following sparse warning:

drivers/ata/libahci.c:134:18: warning: symbol 'ahci_sdev_attrs' was not declared. Should it be static?

Fixes c3f69c7f629f ("scsi: ata: Switch to attribute groups")
---
 drivers/ata/libahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +0 -0
index 28430c093a7f..8a6835bfd18a 100644

drivers/ata/libahci.c const struct attribute_group *ahci_shost_groups[] = { · line 137

Quoted 8 lines
drivers/ata/libahci.c +1 -1
@@ -131,7 +131,7 @@ const struct attribute_group *ahci_shost_groups[] = {
 };
 EXPORT_SYMBOL_GPL(ahci_shost_groups);
 
-struct attribute *ahci_sdev_attrs[] = {
+static struct attribute *ahci_sdev_attrs[] = {
 	&dev_attr_sw_activity.attr,
 	&dev_attr_unload_heads.attr,
 	&dev_attr_ncq_prio_supported.attr,

Looks OK to me.

Bart ?

Signature · 2 lines
Damien Le Moal
Western Digital Research
#2 lore raw
Quoted 32 lines · Damien Le Moal

+Bart

Quoted 1 line · Jiapeng Chong

From: chongjiapeng <[email protected]>

The patch title should be:

ata: libahci: make ahci_sdev_attrs static

Quoted 23 lines

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

Fix the following sparse warning:

drivers/ata/libahci.c:134:18: warning: symbol 'ahci_sdev_attrs' was not declared. Should it be static?

Fixes c3f69c7f629f ("scsi: ata: Switch to attribute groups")
---
  drivers/ata/libahci.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +0 -0
index 28430c093a7f..8a6835bfd18a 100644
@@ -131,7 +131,7 @@ const struct attribute_group *ahci_shost_groups[] = {
  };
  EXPORT_SYMBOL_GPL(ahci_shost_groups);
 
Quoted 8 lines

drivers/ata/libahci.c const struct attribute_group *ahci_shost_groups[] = { · line 137

Quoted 6 lines
drivers/ata/libahci.c +1 -1
-struct attribute *ahci_sdev_attrs[] = {
+static struct attribute *ahci_sdev_attrs[] = {
  	&dev_attr_sw_activity.attr,
  	&dev_attr_unload_heads.attr,
  	&dev_attr_ncq_prio_supported.attr,

Looks OK to me.

The above patch looks fine to me too.

Thanks,

Bart.

#3 lore raw
Quoted 42 lines · Bart Van Assche
Quoted 32 lines · Damien Le Moal

+Bart

Quoted 1 line · Jiapeng Chong

From: chongjiapeng <[email protected]>

The patch title should be:

ata: libahci: make ahci_sdev_attrs static

Quoted 23 lines

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

Fix the following sparse warning:

drivers/ata/libahci.c:134:18: warning: symbol 'ahci_sdev_attrs' was not declared. Should it be static?

Fixes c3f69c7f629f ("scsi: ata: Switch to attribute groups")
---
  drivers/ata/libahci.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +0 -0
index 28430c093a7f..8a6835bfd18a 100644
@@ -131,7 +131,7 @@ const struct attribute_group *ahci_shost_groups[] = {
  };
  EXPORT_SYMBOL_GPL(ahci_shost_groups);
 
Quoted 8 lines

drivers/ata/libahci.c const struct attribute_group *ahci_shost_groups[] = { · line 137

Quoted 6 lines
drivers/ata/libahci.c +1 -1
-struct attribute *ahci_sdev_attrs[] = {
+static struct attribute *ahci_sdev_attrs[] = {
  	&dev_attr_sw_activity.attr,
  	&dev_attr_unload_heads.attr,
  	&dev_attr_ncq_prio_supported.attr,

Looks OK to me.

Quoted 1 line

The above patch looks fine to me too.

Can I add your reviewed-by tag ?

Quoted 5 lines

Thanks,

Bart.

Signature · 2 lines
Damien Le Moal
Western Digital Research
#5 lore raw
In reply to Jiapeng Chong
Quoted 22 lines · Jiapeng Chong

From: chongjiapeng <[email protected]>

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

Fix the following sparse warning:

drivers/ata/libahci.c:134:18: warning: symbol 'ahci_sdev_attrs' was not declared. Should it be static?

Fixes c3f69c7f629f ("scsi: ata: Switch to attribute groups")
---
 drivers/ata/libahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +0 -0
index 28430c093a7f..8a6835bfd18a 100644

drivers/ata/libahci.c const struct attribute_group *ahci_shost_groups[] = { · line 137

Quoted 8 lines
drivers/ata/libahci.c +1 -1
@@ -131,7 +131,7 @@ const struct attribute_group *ahci_shost_groups[] = {
 };
 EXPORT_SYMBOL_GPL(ahci_shost_groups);
 
-struct attribute *ahci_sdev_attrs[] = {
+static struct attribute *ahci_sdev_attrs[] = {
 	&dev_attr_sw_activity.attr,
 	&dev_attr_unload_heads.attr,
 	&dev_attr_ncq_prio_supported.attr,

Jiapeng,

This patch does not apply to the current libata tree since it is against the latest changes queued in the scsi tree. After fixing the patch title, can you resend this patch to the linux-scsi list and to Martin ?

Signature · 2 lines
Damien Le Moal
Western Digital Research