Skip to content

Commit

Permalink
genirq: Use for_each_action_of_desc in actions_show()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Paran Lee authored and Marc Zyngier committed Jul 20, 2022
1 parent ef50cd5 commit c904cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/irqdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ static ssize_t actions_show(struct kobject *kobj,
char *p = "";

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

0 comments on commit c904cda

Please sign in to comment.