qemu/hw/char
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
..
cadence_uart.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
debugcon.c
digic-uart.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
escc.c
etraxfs_ser.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
exynos4210_uart.c
grlib_apbuart.c
imx_serial.c
ipoctal232.c
lm32_juart.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
lm32_uart.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
Makefile.objs stm32f2xx_USART: Add the stm32f2xx USART Controller 2015-03-11 13:21:05 +00:00
mcf_uart.c
milkymist-uart.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
omap_uart.c omap: Fix warnings from Sparse 2015-03-19 11:11:55 +03:00
parallel.c parallel: parallel_hds_isa_init() shouldn't fail 2015-02-24 00:19:06 +01:00
pl011.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
sclpconsole-lm.c
sclpconsole.c
serial-isa.c serial: serial_hds_isa_init() shouldn't fail 2015-02-24 00:19:06 +01:00
serial-pci.c serial-pci: Convert to realize 2015-02-26 12:42:17 +01:00
serial.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00
sh_serial.c
spapr_vty.c spapr_vio: Convert to realize() 2015-03-09 15:00:07 +01:00
stm32f2xx_usart.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
virtio-console.c
virtio-serial-bus.c Convert ffs() != 0 callers to ctz32() 2015-04-28 15:36:08 +02:00
xen_console.c
xilinx_uartlite.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00