Re: [PATCH v2 10/17] signal: make has_pending_signals() return bool

From: Christian Brauner
Date: Fri Jun 01 2018 - 13:46:02 EST


On Fri, Jun 01, 2018 at 06:16:58PM +0200, Oleg Nesterov wrote:
> On 06/01, Christian Brauner wrote:
> >
> > has_pending_signals() already behaves like a boolean function. Let's
> > actually declare it as such too.
>
> But this patch does more.
>
> > - case 4: ready = signal->sig[3] &~ blocked->sig[3];
> > - ready |= signal->sig[2] &~ blocked->sig[2];
> > - ready |= signal->sig[1] &~ blocked->sig[1];
> > - ready |= signal->sig[0] &~ blocked->sig[0];
> > + case 4:
> > + ready = signal->sig[3] & ~blocked->sig[3];
> > + ready |= signal->sig[2] & ~blocked->sig[2];
> > + ready |= signal->sig[1] & ~blocked->sig[1];
> > + ready |= signal->sig[0] & ~blocked->sig[0];
> > break;
>
> Again, personally I do not care at all. But why do you think the code looks
> better after re-formatting? This is subjective, but to me it does not.
>
> In particular, note the extra space before "=" removed by this patch. I guess
> it was added on purpose, and to me
>
> ready = signal->sig[3] &~ blocked->sig[3];
> ready |= signal->sig[2] &~ blocked->sig[2];
>
> actually looks better thab
>
> ready = signal->sig[3] &~ blocked->sig[3];
> ready |= signal->sig[2] &~ blocked->sig[2];
>
> after your patch.

I can drop the changes in v3.

Thanks!
Christian

>
> Oleg.
>