Skip to contentSkip to conversation

tty: replace in_irq() with in_hardirq()

PATCH In review Changbin Du 2 participants 2 messages Aug 14, 2021 – Aug 16, 2021 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: replace in_irq() with in_hardirq()

Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq().

---
 drivers/tty/sysrq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/sysrq.c +2 -2
index 6628792431dc..c911196ac893 100644
@@ -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);
Signature · 1 line
2.30.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Changbin Du

Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq().

... which is just a new name.

Quoted 28 lines
---
  drivers/tty/sysrq.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/sysrq.c +2 -2
index 6628792431dc..c911196ac893 100644
@@ -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);
Signature · 2 lines
js
suse labs