* [GIT pull] irq/domain for v6.12-rc1
@ 2024-09-17 9:01 Thomas Gleixner
2024-09-17 13:33 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2024-09-17 9:01 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, x86
Linus,
please pull the latest irq/domain branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-domain-2024-09-17
up to: 74c60a96ef6a: irqdomain: Remove stray '-' in the domain name
Two small updates for interrupt domains:
- Remove a stray '-' in the domain name
- Consolidate and clarify the bus token checks so they explicitely check
for DOMAIN_BUS_ANY instead of unspecified checks for zero.
Thanks,
tglx
------------------>
Andy Shevchenko (2):
irqdomain: Clarify checks for bus_token
irqdomain: Remove stray '-' in the domain name
kernel/irq/irqdomain.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 01001eb615ec..1acc5308fcb7 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -130,8 +130,10 @@ EXPORT_SYMBOL_GPL(irq_domain_free_fwnode);
static int alloc_name(struct irq_domain *domain, char *base, enum irq_domain_bus_token bus_token)
{
- domain->name = bus_token ? kasprintf(GFP_KERNEL, "%s-%d", base, bus_token) :
- kasprintf(GFP_KERNEL, "%s", base);
+ if (bus_token == DOMAIN_BUS_ANY)
+ domain->name = kasprintf(GFP_KERNEL, "%s", base);
+ else
+ domain->name = kasprintf(GFP_KERNEL, "%s-%d", base, bus_token);
if (!domain->name)
return -ENOMEM;
@@ -146,8 +148,10 @@ static int alloc_fwnode_name(struct irq_domain *domain, const struct fwnode_hand
const char *suf = suffix ? : "";
char *name;
- name = bus_token ? kasprintf(GFP_KERNEL, "%pfw-%s%s%d", fwnode, suf, sep, bus_token) :
- kasprintf(GFP_KERNEL, "%pfw-%s", fwnode, suf);
+ if (bus_token == DOMAIN_BUS_ANY)
+ name = kasprintf(GFP_KERNEL, "%pfw%s%s", fwnode, sep, suf);
+ else
+ name = kasprintf(GFP_KERNEL, "%pfw%s%s-%d", fwnode, sep, suf, bus_token);
if (!name)
return -ENOMEM;
@@ -166,11 +170,13 @@ static int alloc_unknown_name(struct irq_domain *domain, enum irq_domain_bus_tok
static atomic_t unknown_domains;
int id = atomic_inc_return(&unknown_domains);
- domain->name = bus_token ? kasprintf(GFP_KERNEL, "unknown-%d-%d", id, bus_token) :
- kasprintf(GFP_KERNEL, "unknown-%d", id);
-
+ if (bus_token == DOMAIN_BUS_ANY)
+ domain->name = kasprintf(GFP_KERNEL, "unknown-%d", id);
+ else
+ domain->name = kasprintf(GFP_KERNEL, "unknown-%d-%d", id, bus_token);
if (!domain->name)
return -ENOMEM;
+
domain->flags |= IRQ_DOMAIN_NAME_ALLOCATED;
return 0;
}
@@ -200,7 +206,7 @@ static int irq_domain_set_name(struct irq_domain *domain, const struct irq_domai
return alloc_name(domain, fwid->name, bus_token);
default:
domain->name = fwid->name;
- if (bus_token)
+ if (bus_token != DOMAIN_BUS_ANY)
return alloc_name(domain, fwid->name, bus_token);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [GIT pull] irq/domain for v6.12-rc1
2024-09-17 9:01 [GIT pull] irq/domain for v6.12-rc1 Thomas Gleixner
@ 2024-09-17 13:33 ` Linus Torvalds
2024-09-18 13:49 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2024-09-17 13:33 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel, x86
On Tue, 17 Sept 2024 at 11:01, Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Two small updates for interrupt domains:
>
> - Remove a stray '-' in the domain name
>
> - Consolidate and clarify the bus token checks so they explicitely check
> for DOMAIN_BUS_ANY instead of unspecified checks for zero.
Both of these were in my tree with other commit IDs (and both came in from you):
7b9414cb2d37 irqdomain: Remove stray '-' in the domain name
c0ece6449799 irqdomain: Clarify checks for bus_token
so you should just drop this branch.
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [GIT pull] irq/domain for v6.12-rc1
2024-09-17 13:33 ` Linus Torvalds
@ 2024-09-18 13:49 ` Thomas Gleixner
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2024-09-18 13:49 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, x86
On Tue, Sep 17 2024 at 15:33, Linus Torvalds wrote:
> On Tue, 17 Sept 2024 at 11:01, Thomas Gleixner <tglx@linutronix.de> wrote:
>>
>> Two small updates for interrupt domains:
>>
>> - Remove a stray '-' in the domain name
>>
>> - Consolidate and clarify the bus token checks so they explicitely check
>> for DOMAIN_BUS_ANY instead of unspecified checks for zero.
>
> Both of these were in my tree with other commit IDs (and both came in from you):
>
> 7b9414cb2d37 irqdomain: Remove stray '-' in the domain name
> c0ece6449799 irqdomain: Clarify checks for bus_token
>
> so you should just drop this branch.
Clearly my scripts scanning the branches went sideways.
Sorry for the noise.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-18 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 9:01 [GIT pull] irq/domain for v6.12-rc1 Thomas Gleixner
2024-09-17 13:33 ` Linus Torvalds
2024-09-18 13:49 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox