[PATCH v2] selftests/powerpc: Fix pkey syscall redefinitions

David Laight David.Laight at ACULAB.COM
Tue Aug 4 00:42:28 AEST 2020


> > +#undef SYS_pkey_mprotect
> >  #define SYS_pkey_mprotect	386
> 
> We shouldn't undef them.
> 
> They should obviously never change, but if the system headers already
> have a definition then we should use that, so I think it should be:
> 
> #ifndef SYS_pkey_mprotect
> #define SYS_pkey_mprotect	386
> #endif

If the definitions are identical the compiler won't complain.
So you probably actually want a matching definition so that,
provided at least one compile picks up both headers, you know
that the definitions actually match.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)



More information about the Linuxppc-dev mailing list