[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220818111316.2566815-1-zengheng4@huawei.com>
Date: Thu, 18 Aug 2022 19:13:16 +0800
From: Zeng Heng <zengheng4@...wei.com>
To: <kashyap.desai@...adcom.com>, <sumit.saxena@...adcom.com>,
<shivasharan.srikanteshwara@...adcom.com>, <jejb@...ux.ibm.com>,
<martin.petersen@...cle.com>
CC: <megaraidlinux.pdl@...adcom.com>, <linux-scsi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <zengheng4@...wei.com>
Subject: [PATCH -next] scsi: megaraid: Make local symbol 'megasas_debugfs_root' static
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@...wei.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
Powered by blists - more mailing lists