* [PATCH] [PATCH RESEND v2] genirq: Refactor actions_show
@ 2022-07-10 11:26 Paran Lee
2022-07-20 14:29 ` [irqchip: irq/irqchip-next] genirq: Use for_each_action_of_desc in actions_show() irqchip-bot for Paran Lee
0 siblings, 1 reply; 2+ messages in thread
From: Paran Lee @ 2022-07-10 11:26 UTC (permalink / raw)
To: Thomas Gleixner, Marc Zyngier; +Cc: linux-kernel, Austin Kim, Paran Lee
Refactor for loop to macro for_each_action_of_desc
Signed-off-by: Paran Lee <p4ranlee@gmail.com>
---
kernel/irq/irqdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index d323b180b0f3..5db0230aa6b5 100644
--- 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 = ",";
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [irqchip: irq/irqchip-next] genirq: Use for_each_action_of_desc in actions_show()
2022-07-10 11:26 [PATCH] [PATCH RESEND v2] genirq: Refactor actions_show Paran Lee
@ 2022-07-20 14:29 ` irqchip-bot for Paran Lee
0 siblings, 0 replies; 2+ messages in thread
From: irqchip-bot for Paran Lee @ 2022-07-20 14:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Paran Lee, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: c904cda04482d5ab545e5a82cee6084078ef9543
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/c904cda04482d5ab545e5a82cee6084078ef9543
Author: Paran Lee <p4ranlee@gmail.com>
AuthorDate: Sun, 10 Jul 2022 20:26:14 +09:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 20 Jul 2022 15:21:32 +01:00
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
---
kernel/irq/irqdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index d323b18..5db0230 100644
--- 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 = ",";
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-20 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10 11:26 [PATCH] [PATCH RESEND v2] genirq: Refactor actions_show Paran Lee
2022-07-20 14:29 ` [irqchip: irq/irqchip-next] genirq: Use for_each_action_of_desc in actions_show() irqchip-bot for Paran Lee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.