omap_intc: convert ffs(3) to ctz32() in omap_inth_sir_update()
commit41074f3d3ff0e9a3c6f638627c12ebbf6d757cea
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 23 Mar 2015 15:29:29 +0000 (23 15:29 +0000)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Apr 2015 13:36:08 +0000 (28 15:36 +0200)
treeec3bc9485585d311b5a14e590719562967fb604b
parentc9d933185181cb1cf81bc4c9e5c3a10a5934b017
omap_intc: convert ffs(3) to ctz32() in omap_inth_sir_update()

Rewrite the loop using level &= level - 1 to clear the least significant
bit after each iteration.  This simplifies the loop and makes it easy to
replace ffs(3) with ctz32().

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1427124571-28598-8-git-send-email-stefanha@redhat.com
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/intc/omap_intc.c