Skip to content

Commit c904cda

Browse files
paranleeMarc Zyngier
authored andcommitted
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
1 parent ef50cd5 commit c904cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/irq/irqdesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static ssize_t actions_show(struct kobject *kobj,
251251
char *p = "";
252252

253253
raw_spin_lock_irq(&desc->lock);
254-
for (action = desc->action; action != NULL; action = action->next) {
254+
for_each_action_of_desc(desc, action) {
255255
ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%s%s",
256256
p, action->name);
257257
p = ",";

0 commit comments

Comments
 (0)