]> git.baikalelectronics.ru Git - kernel.git/commit
printk: consolidate kmsg_dump_get_buffer/syslog_print_all code
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 3 Mar 2021 10:15:19 +0000 (11:15 +0100)
committerPetr Mladek <pmladek@suse.com>
Mon, 8 Mar 2021 10:43:09 +0000 (11:43 +0100)
commitb470091916ba4283b091a526e99bf006d76a487b
tree41aeee1ceed4a13329ff602ef230d68a9b643b8c
parentb7bca2ff9a783cbfd67ed075daeac013b2ca7962
printk: consolidate kmsg_dump_get_buffer/syslog_print_all code

The logic for finding records to fit into a buffer is the same for
kmsg_dump_get_buffer() and syslog_print_all(). Introduce a helper
function find_first_fitting_seq() to handle this logic.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210303101528.29901-7-john.ogness@linutronix.de
kernel/printk/printk.c