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

From
David Laight <hidden>
Date
2020-08-03 14:45:49
Reply to
Michael Ellerman, 2020-08-03
quoted
+#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)
Thread (4 messages) 4 messages, 3 authors, last reply 2020-08-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help