All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH -next RESEND] nvmet: Make nvmet_debugfs static
  2024-08-22  7:19 [PATCH -next RESEND] nvmet: Make nvmet_debugfs static Jinjie Ruan
@ 2024-08-22  7:14 ` Christoph Hellwig
  2024-08-23  6:41 ` Chaitanya Kulkarni
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-08-22  7:14 UTC (permalink / raw)
  To: Jinjie Ruan; +Cc: hch, sagi, kch, linux-nvme, linux-kernel

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* [PATCH -next RESEND] nvmet: Make nvmet_debugfs static
@ 2024-08-22  7:19 Jinjie Ruan
  2024-08-22  7:14 ` Christoph Hellwig
  2024-08-23  6:41 ` Chaitanya Kulkarni
  0 siblings, 2 replies; 3+ messages in thread
From: Jinjie Ruan @ 2024-08-22  7:19 UTC (permalink / raw)
  To: hch, sagi, kch, linux-nvme, linux-kernel; +Cc: ruanjinjie

The sparse tool complains as follows:

drivers/nvme/target/debugfs.c:16:15: warning:
	symbol 'nvmet_debugfs' was not declared. Should it be static?

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

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/nvme/target/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/debugfs.c b/drivers/nvme/target/debugfs.c
index cb2befc8619e..220c7391fc19 100644
--- a/drivers/nvme/target/debugfs.c
+++ b/drivers/nvme/target/debugfs.c
@@ -13,7 +13,7 @@
 #include "nvmet.h"
 #include "debugfs.h"
 
-struct dentry *nvmet_debugfs;
+static struct dentry *nvmet_debugfs;
 
 #define NVMET_DEBUGFS_ATTR(field) \
 	static int field##_open(struct inode *inode, struct file *file) \
-- 
2.34.1



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

* Re: [PATCH -next RESEND] nvmet: Make nvmet_debugfs static
  2024-08-22  7:19 [PATCH -next RESEND] nvmet: Make nvmet_debugfs static Jinjie Ruan
  2024-08-22  7:14 ` Christoph Hellwig
@ 2024-08-23  6:41 ` Chaitanya Kulkarni
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2024-08-23  6:41 UTC (permalink / raw)
  To: Jinjie Ruan
  Cc: hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org,
	Chaitanya Kulkarni, linux-kernel@vger.kernel.org

On 8/22/24 00:19, Jinjie Ruan wrote:
> The sparse tool complains as follows:
>
> drivers/nvme/target/debugfs.c:16:15: warning:
> 	symbol 'nvmet_debugfs' was not declared. Should it be static?
>
> This symbol is not used outside debugfs.c, so marks it static.
>
> Signed-off-by: Jinjie Ruan<ruanjinjie@huawei.com>

I had patch written for this didn't get a chance to send [1].

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck

 From 15fc2ed4d9508d8489ce99a8794f8cbf45f2b3d2 Mon Sep 17 00:00:00 2001
From: Chaitanya Kulkarni <kch@nvidia.com>
Date: Mon, 24 Jun 2024 22:28:56 -0700
Subject: [PATCH] nvmet: mark nvmet_debugfs static

Mark struct dentry *nvmet_debugfs static in debugfs.c as it is only used
in debugfs.c to remove the following sparse warning reported by kernel
bot:-

drivers/nvme/target/debugfs.c:16:15: sparse: sparse: symbol 
'nvmet_debugfs' was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Closes: 
https://lore.kernel.org/oe-kbuild-all/202406200501.5DrFu8Fu-lkp@intel.com/
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
  drivers/nvme/target/debugfs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/debugfs.c b/drivers/nvme/target/debugfs.c
index cb2befc8619e..220c7391fc19 100644
--- a/drivers/nvme/target/debugfs.c
+++ b/drivers/nvme/target/debugfs.c
@@ -13,7 +13,7 @@
  #include "nvmet.h"
  #include "debugfs.h"

-struct dentry *nvmet_debugfs;
+static struct dentry *nvmet_debugfs;

  #define NVMET_DEBUGFS_ATTR(field) \
      static int field##_open(struct inode *inode, struct file *file) \
-- 
2.40.0



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

end of thread, other threads:[~2024-08-23  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22  7:19 [PATCH -next RESEND] nvmet: Make nvmet_debugfs static Jinjie Ruan
2024-08-22  7:14 ` Christoph Hellwig
2024-08-23  6:41 ` Chaitanya Kulkarni

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.