Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: e1a261ba599e ("printk: Add a short description string to kmsg_dump()")
Suggested-by: Knop Ryszard <ryszard.knop@intel.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Richard Weinberger <richard@nod.at>
Link: https://patchwork.freedesktop.org/patch/msgid/20240719152542.1554440-1-jfalempe@redhat.com

+2 -2
+2 -2
drivers/mtd/mtdoops.c
··· 305 305 struct kmsg_dump_iter iter; 306 306 307 307 /* Only dump oopses if dump_oops is set */ 308 - if (reason == KMSG_DUMP_OOPS && !dump_oops) 308 + if (detail->reason == KMSG_DUMP_OOPS && !dump_oops) 309 309 return; 310 310 311 311 kmsg_dump_rewind(&iter); ··· 317 317 record_size - sizeof(struct mtdoops_hdr), NULL); 318 318 clear_bit(0, &cxt->oops_buf_busy); 319 319 320 - if (reason != KMSG_DUMP_OOPS) { 320 + if (detail->reason != KMSG_DUMP_OOPS) { 321 321 /* Panics must be written immediately */ 322 322 mtdoops_write(cxt, 1); 323 323 } else {