From: Keguang Zhang <keguang.zhang@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Keguang Zhang <keguang.zhang@gmail.com>
Subject: [PATCH] irq/generic-chip: fix the irq_chip name for /proc/interrupts
Date: Mon, 25 Sep 2023 20:17:34 +0800 [thread overview]
Message-ID: <20230925121734.93017-1-keguang.zhang@gmail.com> (raw)
irq_init_generic_chip() only sets name for the first chip type,
which will lead to empty names for other chip types.
Eventually, these names will be shown as "-" /proc/interrupts.
This patch sets name for all chip types by default.
Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
---
kernel/irq/generic-chip.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index c653cd31548d..81ecca08caad 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -219,11 +219,15 @@ void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
int num_ct, unsigned int irq_base,
void __iomem *reg_base, irq_flow_handler_t handler)
{
+ struct irq_chip_type *ct = gc->chip_types;
+ int i;
+
raw_spin_lock_init(&gc->lock);
gc->num_ct = num_ct;
gc->irq_base = irq_base;
gc->reg_base = reg_base;
- gc->chip_types->chip.name = name;
+ for (i = 0; i < num_ct; i++)
+ ct[i].chip.name = name;
gc->chip_types->handler = handler;
}
base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
--
2.39.2
next reply other threads:[~2023-09-25 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 12:17 Keguang Zhang [this message]
2023-10-13 10:31 ` [tip: irq/core] genirq/generic-chip: Fix " tip-bot2 for Keguang Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230925121734.93017-1-keguang.zhang@gmail.com \
--to=keguang.zhang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®