[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877cwtwyyq.ffs@tglx>
Date: Tue, 07 Feb 2023 11:29:17 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Shanker Donthineni <sdonthineni@...dia.com>,
Marc Zyngier <maz@...nel.org>, Michael Walle <michael@...le.cc>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Hans de Goede <hdegoede@...hat.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] genirq: Use the common function irq_expand_nr_irqs()
On Tue, Jan 31 2023 at 10:43, Shanker Donthineni wrote:
> On 1/31/23 03:35, Thomas Gleixner wrote:
>>> +static int irq_expand_nr_irqs(unsigned int nr)
>>> +{
>>> + if (nr > MAX_SPARSE_IRQS)
>>> + return -ENOMEM;
>>> + nr_irqs = nr;
>>> + return 0;
>>> +}
>>
>> or preferrably something like this:
>>
>> if (!IS_ENABLED(CONFIG_SPARSEIRQ) || nr > MAX_SPARSE_IRQS)
>> return -ENOMEM;
>>
>> which makes it entirely clear and also allows the compiler to optimize
>> is down to a 'return -ENOMEM'.
>>
> I'll drop this patch since you're suggesting to remove !SPARSEIRQ support.
Sometime in the future when I analyzed what the implications are. So
just keep it and make it readable.
Thanks,
tglx
Powered by blists - more mailing lists