projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef50cd5
)
genirq: Use for_each_action_of_desc in actions_show()
author
Paran Lee
<p4ranlee@gmail.com>
Sun, 10 Jul 2022 11:26:14 +0000
(20:26 +0900)
committer
Marc Zyngier
<maz@kernel.org>
Wed, 20 Jul 2022 14:21:32 +0000
(15:21 +0100)
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
kernel/irq/irqdesc.c
patch
|
blob
|
history
diff --git
a/kernel/irq/irqdesc.c
b/kernel/irq/irqdesc.c
index
d323b18
..
5db0230
100644
(file)
--- a/
kernel/irq/irqdesc.c
+++ b/
kernel/irq/irqdesc.c
@@
-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 = ",";