From: Hollis Blanchard <[EMAIL PROTECTED]>

Since we use a unsigned long here anyway we can use the optimized __ffs.

Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]>
Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 arch/powerpc/kvm/booke.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index b285e3d..0f06471 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -222,7 +222,7 @@ void kvmppc_core_deliver_interrupts(struct kvm_vcpu *vcpu)
        unsigned int exception;
        unsigned int priority;
 
-       priority = find_first_bit(pending, BITS_PER_BYTE * sizeof(*pending));
+       priority = __ffs(*pending);
        while (priority <= BOOKE_MAX_INTERRUPT) {
                exception = priority_exception[priority];
                if (kvmppc_can_deliver_interrupt(vcpu, exception)) {
-- 
1.6.0.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to