[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220822063056.3890045-1-zengheng4@huawei.com>
Date: Mon, 22 Aug 2022 14:30:56 +0800
From: Zeng Heng <zengheng4@...wei.com>
To: <rostedt@...dmis.org>, <mingo@...hat.com>, <bristot@...nel.org>
CC: <liwei391@...wei.com>, <zengheng4@...wei.com>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH -next] trace: wwnr: Make local symbol 'rv_wwnr' static
The sparse tool complains as follows:
kernel/trace/rv/monitors/wwnr/wwnr.c:18:19:
warning: symbol 'rv_wwnr' was not declared. Should it be static?
The `rv_wwnr` symbol is not dereferenced by other extern files,
so add static qualifier for it.
Signed-off-by: Zeng Heng <zengheng4@...wei.com>
---
kernel/trace/rv/monitors/wwnr/wwnr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/rv/monitors/wwnr/wwnr.c b/kernel/trace/rv/monitors/wwnr/wwnr.c
index 599225d9cf38..a063b93c6a1d 100644
--- a/kernel/trace/rv/monitors/wwnr/wwnr.c
+++ b/kernel/trace/rv/monitors/wwnr/wwnr.c
@@ -15,7 +15,7 @@
#include "wwnr.h"
-struct rv_monitor rv_wwnr;
+static struct rv_monitor rv_wwnr;
DECLARE_DA_MON_PER_TASK(wwnr, unsigned char);
static void handle_switch(void *data, bool preempt, struct task_struct *p,
@@ -59,7 +59,7 @@ static void disable_wwnr(void)
da_monitor_destroy_wwnr();
}
-struct rv_monitor rv_wwnr = {
+static struct rv_monitor rv_wwnr = {
.name = "wwnr",
.description = "wakeup while not running per-task testing model.",
.enable = enable_wwnr,
--
2.25.1
Powered by blists - more mailing lists