Skip to contentSkip to conversation

printk: remove unused suppress_message_printing()

PATCH In review Arnd Bergmann 2 participants 2 messages Jul 10, 2018 – Jul 11, 2018 Printk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk: remove unused suppress_message_printing()

Moving the call to suppress_message_printing() into the '#ifdef CONFIG_PRINTK' section means that the alternative definition is now unused when PRINTK is disabled:

kernel/printk/printk.c:2033:13: error: 'suppress_message_printing' defined but not used [-Werror=unused-function]

This removes the stub function.

Fixes 375899cddcbb ("printk: make sure to print log on console.")
---
 kernel/printk/printk.c | 2 --
 1 file changed, 2 deletions(-)
kernel/printk/printk.c +0 -2
index 4ca0f9bca82c..e015ac4ee367 100644
@@ -2030,8 +2030,6 @@ static void call_console_drivers(const char *ext_text, size_t ext_len,
 				 const char *text, size_t len) {}
 static size_t msg_print_text(const struct printk_log *msg,
 			     bool syslog, char *buf, size_t size) { return 0; }
-static bool suppress_message_printing(int level) { return false; }
-
 #endif /* CONFIG_PRINTK */
 
 #ifdef CONFIG_EARLY_PRINTK
Signature · 1 line
2.9.0
#1 lore raw
Quoted 10 lines · Arnd Bergmann

Moving the call to suppress_message_printing() into the '#ifdef CONFIG_PRINTK' section means that the alternative definition is now unused when PRINTK is disabled:

kernel/printk/printk.c:2033:13: error: 'suppress_message_printing' defined but not used [-Werror=unused-function]

This removes the stub function.

Fixes 375899cddcbb ("printk: make sure to print log on console.")

Arnd, thanks for the patch. I think we got the same report yesterday (0-day build bot) and Petr have addressed the warning already.

	-ss