Read the whole thread, 49 messages PreviousNext Re: [PATCH v12 13/22] selftests/vm: powerpc implementation for generic abstraction FromDave Hansen <hidden> Date2018-03-16 22:23:38 Also inlinux-arch, linux-doc, linux-kselftest, linux-mm, lkmlReply toRam Pai, 2018-02-22 On 02/21/2018 05:55 PM, Ram Pai wrote:quoted hunk ↗ jump to hunk static inline u32 pkey_to_shift(int pkey) { +#if defined(__i386__) || defined(__x86_64__) /* arch */ return pkey * PKEY_BITS_PER_PKEY; +#elif __powerpc64__ /* arch */ + return (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY; +#endif /* arch */ } I really detest the #if #else style. Can't we just have a pkey_ppc.h and a pkey_x86.h or something?
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