Re: [patch V2 02/45] genirq/irqdesc: Switch to lock guards

Jiri Slaby
2025-04-30T05:54:33Z

On 29. 04. 25, 8:54, Thomas Gleixner wrote:
> Replace all lock/unlock pairs with lock guards and simplify the code flow.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> kernel/irq/irqdesc.c | 127 +++++++++++++++++----------------------------------
> 1 file changed, 43 insertions(+), 84 deletions(-)
>
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
...
> @@ -569,12 +539,12 @@ static int alloc_descs(unsigned int star
> return -ENOMEM;
> }
>
> -static int irq_expand_nr_irqs(unsigned int nr)
> +static bool irq_expand_nr_irqs(unsigned int nr)

Here you do ^^^ and:

...
> @@ -677,14 +645,13 @@ static inline int alloc_descs(unsigned i
>
> static int irq_expand_nr_irqs(unsigned int nr)

This was omitted from my prev review -- needs to return bool here too.

> {
> - return -ENOMEM;
> + return false;
> }

thanks,
--
js
suse labs