From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Cc: Herve Codina <herve.codina@bootlin.com>,
Matti Vaittinen <mazziesaccount@gmail.com>,
Mark Brown <broonie@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/2] irqdomain: Remove stray '-' in the IRQ domain name
Date: Mon, 12 Aug 2024 22:29:40 +0300 [thread overview]
Message-ID: <20240812193101.1266625-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240812193101.1266625-1-andriy.shevchenko@linux.intel.com>
When domain suffix is not supplied the fwnode case (not irqchip-fwnode)
uses alloc_fwnode_name(). This currently unconditionally adds a
separator. Fix the logic to make it conditional and drop stray '-' in
the IRQ domain name.
Fixes: 1e7c05292531 ("irqdomain: Allow giving name suffix for domain")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
kernel/irq/irqdomain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 18d253e10e87..1acc5308fcb7 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -149,9 +149,9 @@ static int alloc_fwnode_name(struct irq_domain *domain, const struct fwnode_hand
char *name;
if (bus_token == DOMAIN_BUS_ANY)
- name = kasprintf(GFP_KERNEL, "%pfw-%s", fwnode, suf);
+ name = kasprintf(GFP_KERNEL, "%pfw%s%s", fwnode, sep, suf);
else
- name = kasprintf(GFP_KERNEL, "%pfw-%s%s%d", fwnode, suf, sep, bus_token);
+ name = kasprintf(GFP_KERNEL, "%pfw%s%s-%d", fwnode, sep, suf, bus_token);
if (!name)
return -ENOMEM;
--
2.43.0.rc1.1336.g36b5255a03ac
next prev parent reply other threads:[~2024-08-12 19:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 19:29 [PATCH v1 0/2] irqdomain: A couple of fixes Andy Shevchenko
2024-08-12 19:29 ` [PATCH v1 1/2] irqdomain: Unify checks for bus_token Andy Shevchenko
2024-08-13 8:32 ` Thomas Gleixner
2024-08-13 8:58 ` Andy Shevchenko
2024-08-13 8:47 ` [tip: irq/core] irqdomain: Clarify " tip-bot2 for Andy Shevchenko
2024-08-13 9:41 ` [PATCH v1 1/2] irqdomain: Unify " Matti Vaittinen
2024-08-12 19:29 ` Andy Shevchenko [this message]
2024-08-13 8:47 ` [tip: irq/core] irqdomain: Remove stray '-' in the domain name tip-bot2 for Andy Shevchenko
2024-08-13 9:46 ` [PATCH v1 2/2] irqdomain: Remove stray '-' in the IRQ " Matti Vaittinen
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=20240812193101.1266625-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=herve.codina@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--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