Re: [PATCH] genirq/irqdomain: Clean code for __irq_domain_create()

From: Thomas Gleixner
Date: Tue May 07 2024 - 06:22:40 EST


On Tue, May 07 2024 at 09:22, Jinjie Ruan wrote:
> On 2024/5/7 2:01, Thomas Gleixner wrote:
>>> +out:
>>> + domain->flags |= IRQ_DOMAIN_NAME_ALLOCATED;
>>> + return 0;
>>
>> This function is horrible. The only shared thing here is the
>> domain->flags manipulation. I'm not seeing how this is an improvement.
>
> Yes, the IRQ_DOMAIN_NAME_ALLOCATED flag is shared, the purpose of this
> change is to make the code that allocates the domain name in the
> __irq_domain_create() function look like it doesn't take up too much
> space, so it looks cleaner.

I'm failing to see the cleaner. All this does is shuffling code around
for no reason.

Thanks,

tglx