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

Arnd Bergmann arnd at arndb.de
Wed Nov 13 21:04:03 AEDT 2019


On Wed, Nov 13, 2019 at 9:41 AM Michal Suchánek <msuchanek at suse.de> 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


More information about the Linuxppc-dev mailing list