]> Git Repo - qemu.git/commit - block/rbd.c
Convert (ffs(val) - 1) to ctz32(val)
authorStefan Hajnoczi <[email protected]>
Mon, 23 Mar 2015 15:29:26 +0000 (15:29 +0000)
committerKevin Wolf <[email protected]>
Tue, 28 Apr 2015 13:36:08 +0000 (15:36 +0200)
commit786a4ea82ec9c87e3a895cf41081029b285a5fe5
treefe42f1059c13ea9a27bc9515e5d440d3bb354773
parent5863d374a32c98a7adb4c5e49d62de3cdc16d2ea
Convert (ffs(val) - 1) to ctz32(val)

This commit was generated mechanically by coccinelle from the following
semantic patch:

@@
expression val;
@@
- (ffs(val) - 1)
+ ctz32(val)

The call sites have been audited to ensure the ffs(0) - 1 == -1 case
never occurs (due to input validation, asserts, etc).  Therefore we
don't need to worry about the fact that ctz32(0) == 32.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-id: 1427124571[email protected]
Signed-off-by: Kevin Wolf <[email protected]>
22 files changed:
block.c
block/qcow2-refcount.c
block/qcow2.c
block/qed.c
block/rbd.c
block/sheepdog.c
hw/acpi/pcihp.c
hw/arm/pxa2xx_gpio.c
hw/arm/strongarm.c
hw/display/tc6393xb.c
hw/gpio/max7310.c
hw/gpio/zaurus.c
hw/pci-host/bonito.c
hw/pci/msi.c
hw/pci/pcie_aer.c
hw/pci/shpc.c
hw/pci/slotid_cap.c
hw/ppc/ppce500_spin.c
hw/scsi/megasas.c
include/hw/pci/pci.h
include/hw/pci/pcie_regs.h
target-ppc/cpu.h
This page took 0.032254 seconds and 4 git commands to generate.