Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

printk: Make pr_flush() static

No user outside the printk code and no reason to export this.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220924000454.3319186-2-john.ogness@linutronix.de

authored by

Thomas Gleixner and committed by
Petr Mladek
c60ba2d3 9023ca08

+3 -9
-7
include/linux/printk.h
··· 170 170 #define printk_deferred_enter __printk_safe_enter 171 171 #define printk_deferred_exit __printk_safe_exit 172 172 173 - extern bool pr_flush(int timeout_ms, bool reset_on_progress); 174 - 175 173 /* 176 174 * Please don't use printk_ratelimit(), because it shares ratelimiting state 177 175 * with all other unrelated printk_ratelimit() callsites. Instead use ··· 218 220 219 221 static inline void printk_deferred_exit(void) 220 222 { 221 - } 222 - 223 - static inline bool pr_flush(int timeout_ms, bool reset_on_progress) 224 - { 225 - return true; 226 223 } 227 224 228 225 static inline int printk_ratelimit(void)
+3 -2
kernel/printk/printk.c
··· 2296 2296 } 2297 2297 EXPORT_SYMBOL(_printk); 2298 2298 2299 + static bool pr_flush(int timeout_ms, bool reset_on_progress); 2299 2300 static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress); 2300 2301 2301 2302 #else /* CONFIG_PRINTK */ ··· 2331 2330 { 2332 2331 } 2333 2332 static bool suppress_message_printing(int level) { return false; } 2333 + static bool pr_flush(int timeout_ms, bool reset_on_progress) { return true; } 2334 2334 static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress) { return true; } 2335 2335 2336 2336 #endif /* CONFIG_PRINTK */ ··· 3440 3438 * Context: Process context. May sleep while acquiring console lock. 3441 3439 * Return: true if all enabled printers are caught up. 3442 3440 */ 3443 - bool pr_flush(int timeout_ms, bool reset_on_progress) 3441 + static bool pr_flush(int timeout_ms, bool reset_on_progress) 3444 3442 { 3445 3443 return __pr_flush(NULL, timeout_ms, reset_on_progress); 3446 3444 } 3447 - EXPORT_SYMBOL(pr_flush); 3448 3445 3449 3446 /* 3450 3447 * Delayed printk version, for scheduler-internal messages: