@@ -220,9 +220,6 @@ int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
220220}
221221#endif /* CONFIG_PRINTK && CONFIG_SYSCTL */
222222
223- /* Number of registered extended console drivers. */
224- static int nr_ext_console_drivers ;
225-
226223/*
227224 * Helper macros to handle lockdep when locking/unlocking console_sem. We use
228225 * macros instead of functions so that _RET_IP_ contains useful information.
@@ -433,7 +430,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static;
433430 * per_cpu_areas are initialised. This variable is set to true when
434431 * it's safe to access per-CPU data.
435432 */
436- static bool __printk_percpu_data_ready __read_mostly ;
433+ static bool __printk_percpu_data_ready __ro_after_init ;
437434
438435bool printk_percpu_data_ready (void )
439436{
@@ -2296,6 +2293,7 @@ asmlinkage __visible int _printk(const char *fmt, ...)
22962293}
22972294EXPORT_SYMBOL (_printk );
22982295
2296+ static bool pr_flush (int timeout_ms , bool reset_on_progress );
22992297static bool __pr_flush (struct console * con , int timeout_ms , bool reset_on_progress );
23002298
23012299#else /* CONFIG_PRINTK */
@@ -2330,6 +2328,7 @@ static void call_console_driver(struct console *con, const char *text, size_t le
23302328{
23312329}
23322330static bool suppress_message_printing (int level ) { return false; }
2331+ static bool pr_flush (int timeout_ms , bool reset_on_progress ) { return true; }
23332332static bool __pr_flush (struct console * con , int timeout_ms , bool reset_on_progress ) { return true; }
23342333
23352334#endif /* CONFIG_PRINTK */
@@ -3186,9 +3185,6 @@ void register_console(struct console *newcon)
31863185 console_drivers -> next = newcon ;
31873186 }
31883187
3189- if (newcon -> flags & CON_EXTENDED )
3190- nr_ext_console_drivers ++ ;
3191-
31923188 newcon -> dropped = 0 ;
31933189 if (newcon -> flags & CON_PRINTBUFFER ) {
31943190 /* Get a consistent copy of @syslog_seq. */
@@ -3213,9 +3209,6 @@ void register_console(struct console *newcon)
32133209 if (bootcon_enabled &&
32143210 ((newcon -> flags & (CON_CONSDEV | CON_BOOT )) == CON_CONSDEV ) &&
32153211 !keep_bootcon ) {
3216- /* We need to iterate through all boot consoles, to make
3217- * sure we print everything out, before we unregister them.
3218- */
32193212 for_each_console (con )
32203213 if (con -> flags & CON_BOOT )
32213214 unregister_console (con );
@@ -3254,9 +3247,6 @@ int unregister_console(struct console *console)
32543247 if (res )
32553248 goto out_disable_unlock ;
32563249
3257- if (console -> flags & CON_EXTENDED )
3258- nr_ext_console_drivers -- ;
3259-
32603250 /*
32613251 * If this isn't the last console and it has CON_CONSDEV set, we
32623252 * need to set it on the next preferred console.
@@ -3438,11 +3428,10 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
34383428 * Context: Process context. May sleep while acquiring console lock.
34393429 * Return: true if all enabled printers are caught up.
34403430 */
3441- bool pr_flush (int timeout_ms , bool reset_on_progress )
3431+ static bool pr_flush (int timeout_ms , bool reset_on_progress )
34423432{
34433433 return __pr_flush (NULL , timeout_ms , reset_on_progress );
34443434}
3445- EXPORT_SYMBOL (pr_flush );
34463435
34473436/*
34483437 * Delayed printk version, for scheduler-internal messages:
0 commit comments