All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: make unexported sysfs structures static
@ 2026-06-22 14:23 Ben Dooks
  2026-06-22 14:38 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2026-06-22 14:23 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	linux-nvme, linux-kernel
  Cc: Ben Dooks

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?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/nvme/host/sysfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c
index 933a5adfb7af..75b2d69b5957 100644
--- a/drivers/nvme/host/sysfs.c
+++ b/drivers/nvme/host/sysfs.c
@@ -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);
 
-- 
2.37.2.352.g3c44437643


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

* Re: [PATCH] nvme: make unexported sysfs structures static
  2026-06-22 14:23 [PATCH] nvme: make unexported sysfs structures static Ben Dooks
@ 2026-06-22 14:38 ` Keith Busch
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2026-06-22 14:38 UTC (permalink / raw)
  To: Ben Dooks
  Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, linux-nvme,
	linux-kernel

On Mon, Jun 22, 2026 at 03:23:57PM +0100, Ben Dooks wrote:
> These sysfs attributes are not exported out of sysfs.c so 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

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

end of thread, other threads:[~2026-06-22 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 14:23 [PATCH] nvme: make unexported sysfs structures static Ben Dooks
2026-06-22 14:38 ` Keith Busch

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.