MPILIB: Provide count_leading/trailing_zeros() based on arch functions
authorDavid Howells <dhowells@redhat.com>
Thu, 13 Sep 2012 12:09:33 +0000 (13:09 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Oct 2012 03:20:11 +0000 (13:50 +1030)
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@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: Arnd Bergmann <arnd@arndb.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

No differences found