irqdomain: Remove stray '-' in the domain name
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Aug 2024 19:29:40 +0000 (22:29 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Aug 2024 08:40:10 +0000 (10:40 +0200)
When the domain suffix is not supplied alloc_fwnode_name() unconditionally
adds a separator.

Fix the format strings to get rid of the stray '-' separator.

Fixes: 1e7c05292531 ("irqdomain: Allow giving name suffix for domain")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240812193101.1266625-3-andriy.shevchenko@linux.intel.com
kernel/irq/irqdomain.c

index 18d253e10e875a0180acd3475a86d205195540ea..1acc5308fcb799715984ea485ca08f75592e0715 100644 (file)
@@ -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;