Re: [PATCH] signal: simplify next_signal()

From: Bradley Morgan

Date: Wed Dec 02 2026 - 11:01:09 EST


On 2 December 2026 09:40:54 GMT, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>On 12/01, Bradley Morgan wrote:
>>
>> _NSIG_WORDS is a compile time constant, so the compiler unrolls the
>> loop anyway and the switch is just duplicate code. Same thing commit
>> b7a8d7589a632 ("kernel: refactor: shorten has_pending_signals")
>> removed.
>
>Looks correct at first glance, I'll recheck...

cheers.

>
>But let me ask... Since you simplify this function anyway, perhaps
>__ffs(x) make more sense than ffz(~x) ?


could this be follow up? Or do you want a V2 with this.

>
>Oleg.
>
>

--- Thanks!