s390/mm,fault: use pr_warn(), pr_cont(), ... instead of open-coding
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 12 Oct 2023 07:40:34 +0000 (09:40 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 23 Oct 2023 16:21:21 +0000 (18:21 +0200)
Use pr_warn() and friends instead of open-coding with printk().

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/mm/fault.c

index dcea87f9ef6830e225bd2349e8ef9b30f6a7fa48..2d629c1693e0b67abcfc422897cccc577906016f 100644 (file)
@@ -226,10 +226,10 @@ void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault)
                return;
        if (!__ratelimit(&rs))
                return;
-       printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d ",
-              regs->int_code & 0xffff, regs->int_code >> 17);
+       pr_alert("User process fault: interruption code %04x ilc:%d ",
+                regs->int_code & 0xffff, regs->int_code >> 17);
        print_vma_addr(KERN_CONT "in ", regs->psw.addr);
-       printk(KERN_CONT "\n");
+       pr_cont("\n");
        if (is_mm_fault)
                dump_fault_info(regs);
        show_regs(regs);
@@ -258,11 +258,9 @@ static noinline void do_no_context(struct pt_regs *regs, vm_fault_t fault)
                        return;
        }
        if (fault_type == KERNEL_FAULT)
-               printk(KERN_ALERT "Unable to handle kernel pointer dereference"
-                      " in virtual kernel address space\n");
+               pr_alert("Unable to handle kernel pointer dereference in virtual kernel address space\n");
        else
-               printk(KERN_ALERT "Unable to handle kernel paging request"
-                      " in virtual user address space\n");
+               pr_alert("Unable to handle kernel paging request in virtual user address space\n");
        dump_fault_info(regs);
        die(regs, "Oops");
 }