All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] scsi: megaraid: Make local symbol 'megasas_debugfs_root' static
@ 2022-08-18 11:13 Zeng Heng
  0 siblings, 0 replies; only message in thread
From: Zeng Heng @ 2022-08-18 11:13 UTC (permalink / raw)
  To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
	martin.petersen
  Cc: megaraidlinux.pdl, linux-scsi, linux-kernel, zengheng4

The sparse tool complains as follows:

drivers/scsi/megaraid/megaraid_sas_debugfs.c:45:15: warning: symbol 'megasas_debugfs_root' was not declared. Should it be static?

The `megasas_debugfs_root` symbol is not dereferenced
in drivers/scsi/megaraid/megaraid_sas_base.c any more,
remove the declaration here.

After that, the megasas_debugfs_root symbol is no used
any more except this file
(drivers/scsi/megaraid/megaraid_sas_debugfs.c), so
decorate it with `static`.

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c    | 1 -
 drivers/scsi/megaraid/megaraid_sas_debugfs.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f6c37a97544e..09292749ed97 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -217,7 +217,6 @@ static bool support_pci_lane_margining;
 /* define lock for aen poll */
 static DEFINE_SPINLOCK(poll_aen_lock);
 
-extern struct dentry *megasas_debugfs_root;
 extern int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num);
 
 void
diff --git a/drivers/scsi/megaraid/megaraid_sas_debugfs.c b/drivers/scsi/megaraid/megaraid_sas_debugfs.c
index c69760775efa..4c70aab258e3 100644
--- a/drivers/scsi/megaraid/megaraid_sas_debugfs.c
+++ b/drivers/scsi/megaraid/megaraid_sas_debugfs.c
@@ -42,7 +42,7 @@
 #ifdef CONFIG_DEBUG_FS
 #include <linux/debugfs.h>
 
-struct dentry *megasas_debugfs_root;
+static struct dentry *megasas_debugfs_root;
 
 static ssize_t
 megasas_debugfs_read(struct file *filp, char __user *ubuf, size_t cnt,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-18 11:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 11:13 [PATCH -next] scsi: megaraid: Make local symbol 'megasas_debugfs_root' static Zeng Heng

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.