qemu-patch-raspberry4/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
bitbang_i2c.h
core.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
exynos4210_i2c.c
Makefile.objs
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
smbus_ich9.c pci: Trivial device model conversions to realize 2015-02-26 12:42:16 +01:00
versatile_i2c.c