Skip to content

Commit

Permalink
ata: libata-sata: Declare ata_ncq_sdev_attrs static
Browse files Browse the repository at this point in the history
Since ata_ncq_sdev_attrs is a local struct, declare it static. This
avoids a sparse warning at compile time.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
  • Loading branch information
Damien Le Moal committed Nov 18, 2021
1 parent 7c5f641 commit cac7e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/libata-sata.c
Original file line number Diff line number Diff line change
@@ -922,7 +922,7 @@ DEVICE_ATTR(ncq_prio_enable, S_IRUGO | S_IWUSR,
ata_ncq_prio_enable_show, ata_ncq_prio_enable_store);
EXPORT_SYMBOL_GPL(dev_attr_ncq_prio_enable);

struct attribute *ata_ncq_sdev_attrs[] = {
static struct attribute *ata_ncq_sdev_attrs[] = {
&dev_attr_unload_heads.attr,
&dev_attr_ncq_prio_enable.attr,
&dev_attr_ncq_prio_supported.attr,

0 comments on commit cac7e8b

Please sign in to comment.