Skip to contentSkip to conversation

kernel/sysctl.c: remove unused variable ten_thousand

PATCH Applied Colin Ian King 3 participants 4 messages Dec 21, 2021

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

PATCH 1/1 kernel/sysctl.c: remove unused variable ten_thousand

The const variable ten_thousand is not used, it is redundant and can be removed.

Cleans up clang warning:
kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable] static const int ten_thousand = 10000;

Fixes c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")
---
 kernel/sysctl.c | 3 ---
 1 file changed, 3 deletions(-)
kernel/sysctl.c +0 -3
index 7f07b058b180..ace130de4a17 100644
@@ -95,9 +95,6 @@
 
 /* Constants used for minimum and  maximum */
 
-#ifdef CONFIG_PRINTK
-static const int ten_thousand = 10000;
-#endif
 #ifdef CONFIG_PERF_EVENTS
 static const int six_hundred_forty_kb = 640 * 1024;
 #endif
Signature · 1 line
2.33.1
Acked-by Andrew Morton on v1 1/1
#1 lore raw
Quoted 9 lines · Colin Ian King

The const variable ten_thousand is not used, it is redundant and can be removed.

Cleans up clang warning:
kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable] static const int ten_thousand = 10000;

Fixes c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")

Luis

#2 lore raw
Quoted 5 lines · Luis Chamberlain
Quoted 3 lines · Colin Ian King

The const variable ten_thousand is not used, it is redundant and can be removed.

Quoted 8 lines
Quoted 6 lines

Cleans up clang warning:
kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable] static const int ten_thousand = 10000;

Fixes c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")

Just double checking; I don't think I've seen someone supply someone else's Acked by tag in a reply before. Was there some discussion off thread that I missed? If so, do you mind linking to it? Was this a typo, perhaps, and you meant to supply your own Acked by tag? Are "Luis Chamberlain" and "Andrew Morton" aliases? :^P

Signature · 2 lines
Thanks,
~Nick Desaulniers
#3 lore raw
Quoted 13 lines · Nick Desaulniers
Quoted 12 lines · Luis Chamberlain
Quoted 9 lines · Colin Ian King

The const variable ten_thousand is not used, it is redundant and can be removed.

Cleans up clang warning:
kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable] static const int ten_thousand = 10000;

Fixes c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")
Quoted 7 lines
Quoted 1 line

Just double checking; I don't think I've seen someone supply someone else's Acked by tag in a reply before. Was there some discussion off thread that I missed? If so, do you mind linking to it? Was this a typo, perhaps, and you meant to supply your own Acked by tag? Are "Luis Chamberlain" and "Andrew Morton" aliases? :^P

Haha sorry I copied and paste error.

Luis