From: He Zhe <[email protected]>

A hunk of code that was already removed from RT upstream was introduced by
the merger of v5.4.22 and cause the following build failures. Remove it.

kernel/printk/printk.c: In function 'register_console':
kernel/printk/printk.c:2530:3: error: implicit declaration of function 
'logbuf_lock_irqsave'; did you mean 'xa_lock_irqsave'? 
[-Werror=implicit-function-declaration]
 2530 |   logbuf_lock_irqsave(flags);
      |   ^~~~~~~~~~~~~~~~~~~
      |   xa_lock_irqsave
kernel/printk/printk.c:2530:23: error: 'flags' undeclared (first use in this 
function)
 2530 |   logbuf_lock_irqsave(flags);
      |                       ^~~~~
kernel/printk/printk.c:2530:23: note: each undeclared identifier is reported 
only once for each function it appears in
  CC      arch/x86/entry/syscall_32.o
kernel/printk/printk.c:2540:3: error: 'exclusive_console' undeclared (first use 
in this function)
 2540 |   exclusive_console = newcon;
      |   ^~~~~~~~~~~~~~~~~
kernel/printk/printk.c:2541:3: error: 'exclusive_console_stop_seq' undeclared 
(first use in this function)
 2541 |   exclusive_console_stop_seq = console_seq;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/printk/printk.c:2541:32: error: 'console_seq' undeclared (first use in 
this function); did you mean 'console_sem'?
 2541 |   exclusive_console_stop_seq = console_seq;
      |                                ^~~~~~~~~~~
      |                                console_sem
kernel/printk/printk.c:2543:3: error: 'console_idx' undeclared (first use in 
this function); did you mean 'console_sem'?
 2543 |   console_idx = syslog_idx;
      |   ^~~~~~~~~~~
      |   console_sem
kernel/printk/printk.c:2543:17: error: 'syslog_idx' undeclared (first use in 
this function); did you mean 'syslog_time'?
 2543 |   console_idx = syslog_idx;
      |                 ^~~~~~~~~~

Signed-off-by: He Zhe <[email protected]>
---
 kernel/printk/printk.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 49e9e5450b51..0605a74ad76b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2522,27 +2522,6 @@ void register_console(struct console *newcon)
        if (newcon->flags & CON_EXTENDED)
                nr_ext_console_drivers++;
 
-       if (newcon->flags & CON_PRINTBUFFER) {
-               /*
-                * console_unlock(); will print out the buffered messages
-                * for us.
-                */
-               logbuf_lock_irqsave(flags);
-               /*
-                * We're about to replay the log buffer.  Only do this to the
-                * just-registered console to avoid excessive message spam to
-                * the already-registered consoles.
-                *
-                * Set exclusive_console with disabled interrupts to reduce
-                * race window with eventual console_flush_on_panic() that
-                * ignores console_lock.
-                */
-               exclusive_console = newcon;
-               exclusive_console_stop_seq = console_seq;
-               console_seq = syslog_seq;
-               console_idx = syslog_idx;
-               logbuf_unlock_irqrestore(flags);
-       }
        console_unlock();
        console_sysfs_notify();
 
-- 
2.24.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8428): 
https://lists.yoctoproject.org/g/linux-yocto/message/8428
Mute This Topic: https://lists.yoctoproject.org/mt/71696644/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to