qemu-e2k/hw/gpio
Stefan Hajnoczi bd2a88840e Convert ffs() != 0 callers to ctz32()
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>
2015-04-28 15:36:08 +02:00
..
Makefile.objs PPC: Add MPC8XXX gpio controller 2014-11-04 23:26:12 +01:00
max7310.c Convert (ffs(val) - 1) to ctz32(val) 2015-04-28 15:36:08 +02:00
mpc8xxx.c PPC: Add MPC8XXX gpio controller 2014-11-04 23:26:12 +01:00
omap_gpio.c Convert ffs() != 0 callers to ctz32() 2015-04-28 15:36:08 +02:00
pl061.c
puv3_gpio.c
zaurus.c Convert (ffs(val) - 1) to ctz32(val) 2015-04-28 15:36:08 +02:00