qemu/hw/i2c
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
..
bitbang_i2c.c i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
bitbang_i2c.h i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
core.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
exynos4210_i2c.c i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
Makefile.objs hw: move I2C controllers to hw/i2c/, configure via default-configs/ 2013-04-08 18:13:13 +02:00
omap_i2c.c Convert ffs() != 0 callers to ctz32() 2015-04-28 15:36:08 +02:00
pm_smbus.c Fix debug print warning 2014-09-02 22:38:16 +04:00
smbus.c smbus: return -1 if nothing found at the given address 2014-05-07 19:14:46 +03:00
smbus_eeprom.c Fix grammar in comment 2014-04-18 10:33:36 +04:00
smbus_ich9.c pci: Trivial device model conversions to realize 2015-02-26 12:42:16 +01:00
versatile_i2c.c i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00