tty: replace in_irq() with in_hardirq()
authorChangbin Du <changbin.du@gmail.com>
Sat, 14 Aug 2021 00:50:33 +0000 (08:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Aug 2021 17:01:52 +0000 (19:01 +0200)
Replace the obsolete and ambiguos macro in_irq() with new
macro in_hardirq().

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Link: https://lore.kernel.org/r/20210814005033.2381-1-changbin.du@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/sysrq.c

index 6628792..c911196 100644 (file)
@@ -258,7 +258,7 @@ static void sysrq_handle_showallcpus(int key)
        if (!trigger_all_cpu_backtrace()) {
                struct pt_regs *regs = NULL;
 
-               if (in_irq())
+               if (in_hardirq())
                        regs = get_irq_regs();
                if (regs) {
                        pr_info("CPU%d:\n", smp_processor_id());
@@ -280,7 +280,7 @@ static void sysrq_handle_showregs(int key)
 {
        struct pt_regs *regs = NULL;
 
-       if (in_irq())
+       if (in_hardirq())
                regs = get_irq_regs();
        if (regs)
                show_regs(regs);