Russell Currey <[email protected]> writes:
> diff --git a/arch/powerpc/sysdev/xive/native.c
> b/arch/powerpc/sysdev/xive/native.c
> index b48454be5b98..3b471c0193ca 100644
> --- a/arch/powerpc/sysdev/xive/native.c
> +++ b/arch/powerpc/sysdev/xive/native.c
> @@ -341,7 +341,7 @@ static void xive_native_update_pending(struct xive_cpu
> *xc)
> * of the hypervisor interrupt (if any)
> */
> cppr = ack & 0xff;
> - he = GETFIELD(TM_QW3_NSR_HE, (ack >> 8));
> + he = ((ack >> 8) & TM_QW3_NSR_HE) >> (ffs(TM_QW3_NSR_HE) - 1);
Using the #defines and ffs() here doesn't make the code any more
readable or maintainable.
We can just write:
he = ack >> 14;
Or if we want to be more explicit about it being the top two bits of the
2nd byte:
he = (ack >> 8) >> 6;
cheers