提交 c904cda0 编写于 作者: P Paran Lee 提交者: Marc Zyngier

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: NParan Lee <p4ranlee@gmail.com>
[maz: reword commit message]
Signed-off-by: NMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220710112614.19410-1-p4ranlee@gmail.com
上级 ef50cd57
...@@ -251,7 +251,7 @@ static ssize_t actions_show(struct kobject *kobj, ...@@ -251,7 +251,7 @@ static ssize_t actions_show(struct kobject *kobj,
char *p = ""; char *p = "";
raw_spin_lock_irq(&desc->lock); 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", ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%s%s",
p, action->name); p, action->name);
p = ","; p = ",";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册