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

genirq: Use for_each_action_of_desc in actions_show()

Refactor action_show() to use for_each_action_of_desc instead
of a similar open-coded loop.

Signed-off-by: Paran Lee <p4ranlee@gmail.com>
[maz: reword commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220710112614.19410-1-p4ranlee@gmail.com

authored by

Paran Lee and committed by
Marc Zyngier
c904cda0 ef50cd57

+1 -1
+1 -1
kernel/irq/irqdesc.c
··· 251 251 char *p = ""; 252 252 253 253 raw_spin_lock_irq(&desc->lock); 254 - for (action = desc->action; action != NULL; action = action->next) { 254 + for_each_action_of_desc(desc, action) { 255 255 ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%s%s", 256 256 p, action->name); 257 257 p = ",";