Re: [PATCH] MPILIB: Provide count_leading/trailing_zeros() based on arch functions

From: Arnd Bergmann
Date: Fri Jul 20 2012 - 09:53:44 EST


On Friday 20 July 2012, David Howells wrote:
> Provide count_leading/trailing_zeros() macros based on extant arch bit scanning
> functions rather than reimplementing from scratch in MPILIB.
>
> Whilst we're at it, turn count_foo_zeros(n, x) into n = count_foo_zeros(x).
>
> Also move the definition to asm-generic as other people may be interested in
> using it.
>
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> Cc: David S. Miller <davem@xxxxxxxxxxxxx>
> Cc: Dmitry Kasatkin <dmitry.kasatkin@xxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>

I don't generally like to put stuff into asm-generic when it's unlikely
to be overridden by architectures. It would really belong into
include/linux, but then again we have all the other bitops in asm-generic
as well, so whatever...

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/