mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
printk: kmsg_dump: remove _nolock() variants
kmsg_dump_rewind() and kmsg_dump_get_line() are lockless, so there is no need for _nolock() variants. Remove these functions and switch all callers of the _nolock() variants. The functions without _nolock() were chosen because they are already exported to kernel modules. 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-15-john.ogness@linutronix.de
This commit is contained in:
@@ -2126,8 +2126,8 @@ static int kdb_dmesg(int argc, const char **argv)
|
||||
kdb_set(2, setargs);
|
||||
}
|
||||
|
||||
kmsg_dump_rewind_nolock(&iter);
|
||||
while (kmsg_dump_get_line_nolock(&iter, 1, NULL, 0, NULL))
|
||||
kmsg_dump_rewind(&iter);
|
||||
while (kmsg_dump_get_line(&iter, 1, NULL, 0, NULL))
|
||||
n++;
|
||||
|
||||
if (lines < 0) {
|
||||
@@ -2159,8 +2159,8 @@ static int kdb_dmesg(int argc, const char **argv)
|
||||
if (skip >= n || skip < 0)
|
||||
return 0;
|
||||
|
||||
kmsg_dump_rewind_nolock(&iter);
|
||||
while (kmsg_dump_get_line_nolock(&iter, 1, buf, sizeof(buf), &len)) {
|
||||
kmsg_dump_rewind(&iter);
|
||||
while (kmsg_dump_get_line(&iter, 1, buf, sizeof(buf), &len)) {
|
||||
if (skip) {
|
||||
skip--;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user