[PATCH linux-next] timers: replace in_irq() with in_hardirq()

yexingchen116@gmail.com posted 1 patch 3 years, 5 months ago
kernel/time/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH linux-next] timers: replace in_irq() with in_hardirq()
Posted by yexingchen116@gmail.com 3 years, 5 months ago
From: ye xingchen <ye.xingchen@zte.com.cn>

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

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 kernel/time/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 717fcb9fb14a..f65e3e00ef61 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1838,7 +1838,7 @@ void update_process_times(int user_tick)
 	run_local_timers();
 	rcu_sched_clock_irq(user_tick);
 #ifdef CONFIG_IRQ_WORK
-	if (in_irq())
+	if (in_hardirq())
 		irq_work_tick();
 #endif
 	scheduler_tick();
-- 
2.25.1
Re: [PATCH linux-next] timers: replace in_irq() with in_hardirq()
Posted by John Stultz 3 years, 5 months ago
On Mon, Oct 10, 2022 at 8:06 PM <yexingchen116@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Replace the obsolete and ambiguos macro in_irq() with new
> macro in_hardirq().

Would it make sense to replace both instances of in_irq() in that file at once?

thanks
-john