mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nvdimm: make nd_class variable static
@ 2023-06-16 16:06 Ben Dooks
  2023-06-16 17:59 ` Ira Weiny
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2023-06-16 16:06 UTC (permalink / raw)
  To: nvdimm
  Cc: linux-kernel, dan.j.williams, vishal.l.verma, dave.jiang,
	ira.weiny, Ben Dooks

The nd_class is not used outside of drivers/nvdimm/bus.c and thus sparse
is generating the following warning. Remove this by making it static:

drivers/nvdimm/bus.c:28:14: warning: symbol 'nd_class' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/nvdimm/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index 954dbc105fc8..5852fe290523 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -25,7 +25,7 @@
 
 int nvdimm_major;
 static int nvdimm_bus_major;
-struct class *nd_class;
+static struct class *nd_class;
 static DEFINE_IDA(nd_ida);
 
 static int to_nd_device_type(const struct device *dev)
-- 
2.39.2


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

* Re: [PATCH] nvdimm: make nd_class variable static
  2023-06-16 16:06 [PATCH] nvdimm: make nd_class variable static Ben Dooks
@ 2023-06-16 17:59 ` Ira Weiny
  0 siblings, 0 replies; 2+ messages in thread
From: Ira Weiny @ 2023-06-16 17:59 UTC (permalink / raw)
  To: Ben Dooks, nvdimm
  Cc: linux-kernel, dan.j.williams, vishal.l.verma, dave.jiang,
	ira.weiny, Ben Dooks

Ben Dooks wrote:
> The nd_class is not used outside of drivers/nvdimm/bus.c and thus sparse
> is generating the following warning. Remove this by making it static:
> 
> drivers/nvdimm/bus.c:28:14: warning: symbol 'nd_class' was not declared. Should it be static?
 
Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/nvdimm/bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
> index 954dbc105fc8..5852fe290523 100644
> --- a/drivers/nvdimm/bus.c
> +++ b/drivers/nvdimm/bus.c
> @@ -25,7 +25,7 @@
>  
>  int nvdimm_major;
>  static int nvdimm_bus_major;
> -struct class *nd_class;
> +static struct class *nd_class;
>  static DEFINE_IDA(nd_ida);
>  
>  static int to_nd_device_type(const struct device *dev)
> -- 
> 2.39.2
> 



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

end of thread, other threads:[~2023-06-16 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16 16:06 [PATCH] nvdimm: make nd_class variable static Ben Dooks
2023-06-16 17:59 ` Ira Weiny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®