All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] lkdtm/bugs: make huge and ignored static
@ 2022-09-26  2:35 ruanjinjie
  0 siblings, 0 replies; 2+ messages in thread
From: ruanjinjie @ 2022-09-26  2:35 UTC (permalink / raw)
  To: keescook, arnd, gregkh, linux-kernel; +Cc: ruanjinjie

The symbol is not used outside of the file, so mark it static.

Fixes the following warnings:

./drivers/misc/lkdtm/bugs.c:276:23: warning: symbol 'huge'
was not declared. Should it be static?

./drivers/misc/lkdtm/bugs.c:277:23: warning: symbol 'ignored'
was not declared. Should it be static?

Signed-off-by: ruanjinjie <ruanjinjie@huawei.com>
---
 drivers/misc/lkdtm/bugs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c
index 48821f4c2b21..53beecb74c48 100644
--- a/drivers/misc/lkdtm/bugs.c
+++ b/drivers/misc/lkdtm/bugs.c
@@ -273,8 +273,8 @@ static void lkdtm_HUNG_TASK(void)
 	schedule();
 }
 
-volatile unsigned int huge = INT_MAX - 2;
-volatile unsigned int ignored;
+static volatile unsigned int huge = INT_MAX - 2;
+static volatile unsigned int ignored;
 
 static void lkdtm_OVERFLOW_SIGNED(void)
 {
-- 
2.25.1


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

* [PATCH -next] lkdtm/bugs: Make huge and ignored static
@ 2023-08-04  8:49 GUO Zihua
  0 siblings, 0 replies; 2+ messages in thread
From: GUO Zihua @ 2023-08-04  8:49 UTC (permalink / raw)
  To: keescook, arnd, gregkh; +Cc: linux-kernel

huge and ignored is not referred elsewhere, so make them static.

This resolves sparse warnings:
  warning: symbol 'huge' was not declared. Should it be static?
  warning: symbol 'ignored' was not declared. Should it be static?

Signed-off-by: GUO Zihua <guozihua@huawei.com>
---
 drivers/misc/lkdtm/bugs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c
index 3c95600ab2f7..9b0310e0b923 100644
--- a/drivers/misc/lkdtm/bugs.c
+++ b/drivers/misc/lkdtm/bugs.c
@@ -273,8 +273,8 @@ static void lkdtm_HUNG_TASK(void)
 	schedule();
 }
 
-volatile unsigned int huge = INT_MAX - 2;
-volatile unsigned int ignored;
+static const volatile unsigned int huge = INT_MAX - 2;
+static volatile unsigned int ignored;
 
 static void lkdtm_OVERFLOW_SIGNED(void)
 {
-- 
2.17.1


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

end of thread, other threads:[~2023-08-04  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26  2:35 [PATCH -next] lkdtm/bugs: make huge and ignored static ruanjinjie
2023-08-04  8:49 [PATCH -next] lkdtm/bugs: Make " GUO Zihua

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.