Commit 1f7ce431 authored by Jocelyn Falempe's avatar Jocelyn Falempe

mtd: mtdoops: Fix kmsgdump parameter renaming.

When the kmsg_dumper callback parameter changed, the reason variable
in mtdoops_do_dump() was not updated accordingly.
This breaks the build with mtdoops.

Fixes: e1a261ba ("printk: Add a short description string to kmsg_dump()")
Suggested-by: default avatarKnop Ryszard <ryszard.knop@intel.com>
Signed-off-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Acked-by: default avatarRichard Weinberger <richard@nod.at>
Link: https://patchwork.freedesktop.org/patch/msgid/20240719152542.1554440-1-jfalempe@redhat.com
parent 1c1ed27e
...@@ -305,7 +305,7 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper, ...@@ -305,7 +305,7 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper,
struct kmsg_dump_iter iter; struct kmsg_dump_iter iter;
/* Only dump oopses if dump_oops is set */ /* Only dump oopses if dump_oops is set */
if (reason == KMSG_DUMP_OOPS && !dump_oops) if (detail->reason == KMSG_DUMP_OOPS && !dump_oops)
return; return;
kmsg_dump_rewind(&iter); kmsg_dump_rewind(&iter);
...@@ -317,7 +317,7 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper, ...@@ -317,7 +317,7 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper,
record_size - sizeof(struct mtdoops_hdr), NULL); record_size - sizeof(struct mtdoops_hdr), NULL);
clear_bit(0, &cxt->oops_buf_busy); clear_bit(0, &cxt->oops_buf_busy);
if (reason != KMSG_DUMP_OOPS) { if (detail->reason != KMSG_DUMP_OOPS) {
/* Panics must be written immediately */ /* Panics must be written immediately */
mtdoops_write(cxt, 1); mtdoops_write(cxt, 1);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment