Skip to content

Commit c60ba2d

Browse files
KAGA-KOKOpmladek
authored andcommitted
printk: Make pr_flush() static
No user outside the printk code and no reason to export this. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: John Ogness <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9023ca0 commit c60ba2d

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

include/linux/printk.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ extern void __printk_safe_exit(void);
170170
#define printk_deferred_enter __printk_safe_enter
171171
#define printk_deferred_exit __printk_safe_exit
172172

173-
extern bool pr_flush(int timeout_ms, bool reset_on_progress);
174-
175173
/*
176174
* Please don't use printk_ratelimit(), because it shares ratelimiting state
177175
* with all other unrelated printk_ratelimit() callsites. Instead use
@@ -222,11 +220,6 @@ static inline void printk_deferred_exit(void)
222220
{
223221
}
224222

225-
static inline bool pr_flush(int timeout_ms, bool reset_on_progress)
226-
{
227-
return true;
228-
}
229-
230223
static inline int printk_ratelimit(void)
231224
{
232225
return 0;

kernel/printk/printk.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,6 +2296,7 @@ asmlinkage __visible int _printk(const char *fmt, ...)
22962296
}
22972297
EXPORT_SYMBOL(_printk);
22982298

2299+
static bool pr_flush(int timeout_ms, bool reset_on_progress);
22992300
static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress);
23002301

23012302
#else /* CONFIG_PRINTK */
@@ -2330,6 +2331,7 @@ static void call_console_driver(struct console *con, const char *text, size_t le
23302331
{
23312332
}
23322333
static bool suppress_message_printing(int level) { return false; }
2334+
static bool pr_flush(int timeout_ms, bool reset_on_progress) { return true; }
23332335
static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress) { return true; }
23342336

23352337
#endif /* CONFIG_PRINTK */
@@ -3438,11 +3440,10 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
34383440
* Context: Process context. May sleep while acquiring console lock.
34393441
* Return: true if all enabled printers are caught up.
34403442
*/
3441-
bool pr_flush(int timeout_ms, bool reset_on_progress)
3443+
static bool pr_flush(int timeout_ms, bool reset_on_progress)
34423444
{
34433445
return __pr_flush(NULL, timeout_ms, reset_on_progress);
34443446
}
3445-
EXPORT_SYMBOL(pr_flush);
34463447

34473448
/*
34483449
* Delayed printk version, for scheduler-internal messages:

0 commit comments

Comments
 (0)