* [PATCH] irqchip/irq-sifive-plic: Use for_each_present_cpu() instead of for_each_cpu()
@ 2025-08-11 6:47 Fushuai Wang
2025-08-24 10:22 ` [tip: irq/drivers] irqchip/sifive-plic: " tip-bot2 for Fushuai Wang
0 siblings, 1 reply; 2+ messages in thread
From: Fushuai Wang @ 2025-08-11 6:47 UTC (permalink / raw)
To: linux-riscv, linux-kernel
Cc: samuel.holland, paul.walmsley, tglx, Fushuai Wang
Replace the opencoded for_each_cpu(cpu, cpu_present_mask) loop with the
more readable and equivalent for_each_present_cpu(cpu) macro.
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
---
drivers/irqchip/irq-sifive-plic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index bf69a4802b71..3de54606b8f8 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -257,7 +257,7 @@ static int plic_irq_suspend(void)
readl(priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID));
}
- for_each_cpu(cpu, cpu_present_mask) {
+ for_each_present_cpu(cpu) {
struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu);
if (!handler->present)
@@ -289,7 +289,7 @@ static void plic_irq_resume(void)
priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID);
}
- for_each_cpu(cpu, cpu_present_mask) {
+ for_each_present_cpu(cpu) {
struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu);
if (!handler->present)
--
2.36.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip: irq/drivers] irqchip/sifive-plic: Use for_each_present_cpu() instead of for_each_cpu()
2025-08-11 6:47 [PATCH] irqchip/irq-sifive-plic: Use for_each_present_cpu() instead of for_each_cpu() Fushuai Wang
@ 2025-08-24 10:22 ` tip-bot2 for Fushuai Wang
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Fushuai Wang @ 2025-08-24 10:22 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Fushuai Wang, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: b92ff23b12046f70f7f41f1e57e77c498dec35d7
Gitweb: https://git.kernel.org/tip/b92ff23b12046f70f7f41f1e57e77c498dec35d7
Author: Fushuai Wang <wangfushuai@baidu.com>
AuthorDate: Mon, 11 Aug 2025 14:47:01 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 24 Aug 2025 12:10:46 +02:00
irqchip/sifive-plic: Use for_each_present_cpu() instead of for_each_cpu()
Replace the open coded for_each_cpu(cpu, cpu_present_mask) loop with the
more readable and equivalent for_each_present_cpu(cpu) macro.
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250811064701.2906-1-wangfushuai@baidu.com
---
drivers/irqchip/irq-sifive-plic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index bf69a48..3de5460 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -257,7 +257,7 @@ static int plic_irq_suspend(void)
readl(priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID));
}
- for_each_cpu(cpu, cpu_present_mask) {
+ for_each_present_cpu(cpu) {
struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu);
if (!handler->present)
@@ -289,7 +289,7 @@ static void plic_irq_resume(void)
priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID);
}
- for_each_cpu(cpu, cpu_present_mask) {
+ for_each_present_cpu(cpu) {
struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu);
if (!handler->present)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-24 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11 6:47 [PATCH] irqchip/irq-sifive-plic: Use for_each_present_cpu() instead of for_each_cpu() Fushuai Wang
2025-08-24 10:22 ` [tip: irq/drivers] irqchip/sifive-plic: " tip-bot2 for Fushuai Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®