Re: [PATCH 31/33] powerpc/64: make buildable without CONFIG_COMPAT

From: Arnd Bergmann
Date: Wed Nov 13 2019 - 05:04:43 EST


On Wed, Nov 13, 2019 at 9:41 AM Michal SuchÃnek <msuchanek@xxxxxxx> wrote:
>
> On Wed, Nov 13, 2019 at 01:02:34PM +1000, Nicholas Piggin wrote:

> > >
> > > @@ -277,7 +276,7 @@ static void do_signal(struct task_struct *tsk)
> > >
> > > rseq_signal_deliver(&ksig, tsk->thread.regs);
> > >
> > > - if (is32) {
> > > + if (is_32bit_task()) {
> > > if (ksig.ka.sa.sa_flags & SA_SIGINFO)
> > > ret = handle_rt_signal32(&ksig, oldset, tsk);
> > > else
> >
> > This is just a clean up I guess.
>
> It also expands directly to if(0) or if(1) for the !COMPAT cases. I am
> not sure how it would work with the intermediate variable.
>
> There was more complex change initially but after some additional
> cleanups removing the variable is the only part left.

I would be surprised if that made any difference to a modern compiler,
but the new version is definitely clearer to human readers.

Arnd