From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F0991BE86E for ; Thu, 20 Feb 2025 08:17:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740039472; cv=none; b=Ps51oQuVs8CcQ9ovJZdDs+TgG87U23HLhnyWW+lV1chsB9mCr7nSVgnQdX85bJPUdkip9i8cAHbz3m0XKNvIiQygIdShgdaYvmKUQPnCcRUkiFqm7C5k5G2hVdhGIKgkHEROPIDYhh5xhn9om8jE+kjjRwF7IzkOXO7WJ0etWlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740039472; c=relaxed/simple; bh=s3gp0OrOSRtITmi/d/biKALWbzwkoZUuTw6CEsa9YtU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CECd53winiehDqg+8zCjBQntoEfqNJPA6ovKGSZFaCZ1+eycmU5ZdHu3pOvXP1AhD/q/NXK5AqBaKOkv9Gbe1kyv+3bUp5CD+1tX/SY7RmzPamAYBdH5HkaHHmf+LbDVuhvVbm8CXpNzcHpN91cxRN2lk1bfA1tyjvXfUsz2c7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s8OITsWW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s8OITsWW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67B70C4CED1; Thu, 20 Feb 2025 08:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740039472; bh=s3gp0OrOSRtITmi/d/biKALWbzwkoZUuTw6CEsa9YtU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=s8OITsWWisG4iDWOojmcv5DdU3GPJi1JohRNV1A/QUL+2AJIOxr8txqRPTTAePe+u Kk28h6sHfdt3bki82DnTUYo+VRXFSchEzHCRiqwsuDvyBWwTwI735MVPUX+3F0pVOB u2JEx0gAQAPwUuf/uPvtmUzMrvqrETy7aGcedwfuneFk5M+IQSLnbBLfDb3iD/Xkmz mPenrR9hlL0sGLE3RaHjhkoDXkYjOC+kvK58mBuTDdtHz7VTJCSiDEPiN6Xzh9PB6l kmBzr7fxyj2CcBZm3+F1jsbAgLRFv6SsUk/J/4dOoDnXZDK+C+Dzs/CLc9k2wauq0n S8Xi/Z7ohT5kQ== Message-ID: <14544066-73b8-42a0-a29a-2d21ef0aa459@kernel.org> Date: Thu, 20 Feb 2025 09:17:49 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 09/18] irqdomain: Rename _add functions to _add_*_of_node To: tglx Cc: maz@kernel.org, linux-kernel@vger.kernel.org References: <20250115085409.1629787-1-jirislaby@kernel.org> <20250115085409.1629787-10-jirislaby@kernel.org> <87wme3m4a9.ffs@tglx> Content-Language: en-US From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3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eUVneqM2TUQQbK+Kh7JwmGVrRGNqQrDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj9YLx jhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbcezWI wZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <87wme3m4a9.ffs@tglx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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