Message ID | 20220818111316.2566815-1-zengheng4@huawei.com |
---|---|
State | New |
Headers | show |
Series | [-next] scsi: megaraid: Make local symbol 'megasas_debugfs_root' static | expand |
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,
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(-)