Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Fushuai Wang and committed by
Thomas Gleixner
b92ff23b 7ee4a5a2

+2 -2
+2 -2
drivers/irqchip/irq-sifive-plic.c
··· 257 257 readl(priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID)); 258 258 } 259 259 260 - for_each_cpu(cpu, cpu_present_mask) { 260 + for_each_present_cpu(cpu) { 261 261 struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu); 262 262 263 263 if (!handler->present) ··· 289 289 priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID); 290 290 } 291 291 292 - for_each_cpu(cpu, cpu_present_mask) { 292 + for_each_present_cpu(cpu) { 293 293 struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu); 294 294 295 295 if (!handler->present)