From: Jiri Slaby <jirislaby@kernel.org>
To: tglx <tglx@linutronix.de>
Cc: maz@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/18] irqdomain: Rename _add functions to _add_*_of_node
Date: Thu, 20 Feb 2025 09:17:49 +0100 [thread overview]
Message-ID: <14544066-73b8-42a0-a29a-2d21ef0aa459@kernel.org> (raw)
In-Reply-To: <87wme3m4a9.ffs@tglx>
Thomas,
sorry for the delay, I drowned in tty.
On 06. 02. 25, 17:22, tglx wrote:
> On Wed, Jan 15 2025 at 09:53, Jiri Slaby (SUSE) wrote:
>> For readers, it is very confusing that:
>> * irq_domain_add_*() functions are dedicated to of_nodes,
>> * irq_domain_create_*() ones to fwnodes, and
>> * irq_domain_instantiate() to the universal struct irq_domain_info.
>>
>> Neither _create, nor _add designate any of those nodes. Despite the
>> naming, the functionality of them is the same: add an irq domain (by
>> generic irq_domain_instantiate()). So the source of the confusion is the
>> naming proper -- making the distinction based on _create, _add, and
>> _instantiate.
>>
>> Therefore, here an "_of_node" suffix is added to all "_add" functions
>> (of_node ones). In the next patch, "_create" (fwnode ones) are switched
>> to "_add_fwnode". And finally, "_instantiate" is renamed to "_add".
>>
>> So when all are applied, the interface is much easier to follow:
>> * dom = irq_domain_add_linear_of_node(of_node, ...)
>> * dom = irq_domain_add_linear_fwnode(fwnode, ...)
>> * dom = irq_domain_add(info)
>> * irq_domain_remove(dom)
>
> I'm not convinced that this _of_node() _fwnode() churn is actually
> valuable. I rather go and consolidate the code so that the core
> functions take a fwnode argument, i.e.
>
> - irq_domain_add_xxx(node, ...)
> + irq_domain_add_xxx(of_fwnode_handle(node), ....)
>
> It's not asked too much from the developer to use of_fwnode_handle() at
> the call site and the resulting treewide churn is pretty much the same
> as in any case all call sites need to be touched.
OK, NP. I am only confused by your "I rather go". Does it mean you are
already on it? Or should I translate that as "I'd rather go", ie. /me
doing the work -- I expect this case and can indeed do the job. I just
don't want to duplicate the work.
> But that brings me to the question of logistics for this overhaul. As
> this is a treewide change, there is quite some potential to create
> conflicts all over the place.
>
> So the obvious solution is to consolidate on the existing
> irq_domain_create_*() API, which is not the worst naming once everything
> is unified, i.e.
>
> - irq_domain_add_xxx(node, ...)
> + irq_domain_create_xxx(of_fwnode_handle(node), ....)
>
> It allows to distribute these changes (except for the _nomap() oddity,
> which is OF only) right now to the relevant subsystems and I can collect
> the ignored changes in the irq tree. The final removal of the _add*()
> interfaces can then be done towards the end of the merge window.
>
> Thoughts?
Sounds good to me.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2025-02-20 8:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 8:53 [PATCH 00/18] irqdomain: couple cleanups and documentation Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 01/18] irqdomain.h: Remove extern from function declarations Jiri Slaby (SUSE)
2025-03-10 9:06 ` [tip: irq/core] irqdomain: " tip-bot2 for Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 02/18] irqdomain: Rename irq_set_default_host() to irq_set_default_domain() Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 03/18] irqdomain: Rename irq_get_default_host() to irq_get_default_domain() Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 04/18] irqdomain.h: Stop using 'host' for domain Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 05/18] irqdomain: Drop of_node_to_fwnode() Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 06/18] irqdomain: Make a couple of functions an inline Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 07/18] irqdomain: Make irq_domain_instantiate() returned domains an initializer Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 08/18] irqdomain: Make struct irq_domain_info variables const Jiri Slaby (SUSE)
2025-01-15 8:53 ` [PATCH 09/18] irqdomain: Rename _add functions to _add_*_of_node Jiri Slaby (SUSE)
2025-02-06 16:22 ` tglx
2025-02-20 8:17 ` Jiri Slaby [this message]
2025-02-20 14:23 ` Thomas Gleixner
2025-01-15 8:53 ` [PATCH 10/18] irqdomain: Rename _create functions to _add_*_fwnode Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 11/18] irqdomain: Rename _instantiate functions to _add Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 12/18] irqdomain: Switch away from irq_linear_revmap() and drop it Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 13/18] irqdomain.h: Improve kernel-docs of functions Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 14/18] docs: irq/concepts: Add commas and reflow Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 15/18] docs: irq/concepts: Minor improvements Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 16/18] docs: irq-domain.rst: Simple improvements Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 17/18] docs: irqdomain: Update Jiri Slaby (SUSE)
2025-01-15 8:54 ` [PATCH 18/18] irqdomain.c: Fix kernel-doc and add it to Documentation Jiri Slaby (SUSE)
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=14544066-73b8-42a0-a29a-2d21ef0aa459@kernel.org \
--to=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@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