Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

From: Ingo Molnar
Date: Mon May 14 2018 - 05:30:41 EST



* Dave Hansen <dave.hansen@xxxxxxxxx> wrote:

> On 05/08/2018 02:14 AM, Li Zhijian wrote:
> > -u32 pkey_get(int pkey, unsigned long flags)
> > +u32 _pkey_get(int pkey, unsigned long flags)
> > {
> > u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE);
> > u32 pkru = __rdpkru();
> > @@ -422,7 +426,7 @@ u32 pkey_get(int pkey, unsigned long flags)
> > return masked_pkru;
> > }
>
> I'm not a huge fan of random underscores for undocumented reasons. But,
> oh well.
>
> Acked-by: Dave Hansen <dave.hansen@xxxxxxxxx>

So I saw these too late, fixed them already, and did it slightly differently:
I used a hw_*() prefix which I think is cleaner and more obvious than underscores.

Thanks,

Ingo