There are a number of ffs(3) callers that do roughly:
  bit = ffs(val);
  if (bit) {
      do_something(bit - 1);
  }
This pattern can be converted to ctz32() like this:
  zeroes = ctz32(val);
  if (zeroes != 32) {
      do_something(zeroes);
  }
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1427124571-28598-6-git-send-email-stefanha@redhat.com
Signed-off-by: Kevin Wolf <kwolf@redhat.com>