nvme: make unexported sysfs structures static
PATCH 1/1 nvme: make unexported sysfs structures static
These sysfs attributes are not exported out of sysfs.c so make them static to remove the following sparse warnings:
drivers/nvme/host/sysfs.c:397:25: warning: symbol 'dev_attr_io_errors' was not declared. Should it be static? drivers/nvme/host/sysfs.c:444:30: warning: symbol 'nvme_ns_diag_attr_group' was not declared. Should it be static? drivers/nvme/host/sysfs.c:1150:25: warning: symbol 'dev_attr_adm_errors' was not declared. Should it be static?
--- drivers/nvme/host/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/nvme/host/sysfs.c +3 -3
@@ -394,7 +394,7 @@ static ssize_t nvme_io_errors_store(struct device *dev,return count; } -struct device_attribute dev_attr_io_errors = +static struct device_attribute dev_attr_io_errors =__ATTR (command_error_count,0644 , nvme_io_errors_show, nvme_io_errors_store);
@@ -441,7 +441,7 @@ static umode_t nvme_ns_diag_attrs_are_visible(struct kobject *kobj,return a->mode; } -const struct attribute_group nvme_ns_diag_attr_group = { +static const struct attribute_group nvme_ns_diag_attr_group = { .name ="diag" , .attrs = nvme_ns_diag_attrs, .is_visible = nvme_ns_diag_attrs_are_visible,
@@ -1147,7 +1147,7 @@ static ssize_t nvme_adm_errors_store(struct device *dev,return count; } -struct device_attribute dev_attr_adm_errors = +static struct device_attribute dev_attr_adm_errors =__ATTR (command_error_count,0644 , nvme_adm_errors_show, nvme_adm_errors_store);
Signature · 1 line
2.37.2.352.g3c44437643
Keith Busch
maintainerQuoted 2 lines · Ben Dooks
These sysfs attributes are not exported out of
sysfs.cso make them static to remove the following sparse warnings:
Thanks, though I already have this fix queued up for the next pull request that will be sent out this week:
https://git.infradead.org/?p=nvme.git;a=commitdiff;h=ac48c49116d3de84fabc224c6e43f08740b1460d