[RFC PATCH 1/6] softirq: Turn set_softirq_pending() to reset_softirq_pending()
From: Frederic Weisbecker
Date: Tue Aug 01 2023 - 09:24:56 EST
set_softirq_pending() is only ever used to reset the pending vector's
mask to 0. Make the function more specialized for that very purpose and
rename it accordingly.
Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
---
include/linux/interrupt.h | 2 +-
kernel/softirq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index bf82980f569d..2099fe3980bc 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -524,7 +524,7 @@ DECLARE_STATIC_KEY_FALSE(force_irqthreads_key);
#endif
#define local_softirq_pending() (__this_cpu_read(local_softirq_pending_ref))
-#define set_softirq_pending(x) (__this_cpu_write(local_softirq_pending_ref, (x)))
+#define reset_softirq_pending() (__this_cpu_write(local_softirq_pending_ref, 0))
#define or_softirq_pending(x) (__this_cpu_or(local_softirq_pending_ref, (x)))
#endif /* local_softirq_pending */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 623985f18833..1a3c3fe341ea 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -532,7 +532,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
restart:
/* Reset the pending bitmask before enabling irqs */
- set_softirq_pending(0);
+ reset_softirq_pending();
local_irq_enable();
--
2.34.1