Skip to contentSkip to conversation

printk: make suppress_panic_printk static

PATCH In review Jiapeng Chong 4 participants 4 messages Feb 16, 2022 – Feb 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk: make suppress_panic_printk static

This symbol is not used outside of printk.c, so marks it static.

Fix the following sparse warning:

kernel/printk/printk.c:100:19: warning: symbol 'suppress_panic_printk' was not declared. Should it be static?

---
 kernel/printk/printk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/printk/printk.c +1 -1
index 7a9eace19191..703397cadd01 100644
@@ -97,7 +97,7 @@ int __read_mostly suppress_printk;
  * During panic, heavy printk by other CPUs can delay the
  * panic and risk deadlock on console resources.
  */
-int __read_mostly suppress_panic_printk;
+static int __read_mostly suppress_panic_printk;
 
 #ifdef CONFIG_LOCKDEP
 static struct lockdep_map console_lock_dep_map = {
Signature · 1 line
2.20.1.7.g153144c
Reviewed-by on v1 1/1
#2 lore raw
In reply to Jiapeng Chong
Quoted 10 lines · Jiapeng Chong

This symbol is not used outside of printk.c, so marks it static.

Fix the following sparse warning:

kernel/printk/printk.c:100:19: warning: symbol 'suppress_panic_printk' was not declared. Should it be static?

It could be good to mention this is based on -next.

Cheers,
Miguel

maintainer
#3 lore raw
In reply to Jiapeng Chong
Quoted 9 lines · Jiapeng Chong

This symbol is not used outside of printk.c, so marks it static.

Fix the following sparse warning:

kernel/printk/printk.c:100:19: warning: symbol 'suppress_panic_printk' was not declared. Should it be static?

The patch has been committed into printk/linux.git, branch for-5.18-panic-deadlocks.

Best Regards,
Petr