[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] arm: vgic: Use find_first_bit instead of find_next_bit when possible



commit 5c8d5fb0c524391e07f2da4660a9970af3cb4025
Author:     Artem Mygaiev <artem_mygaiev@xxxxxxxx>
AuthorDate: Thu May 24 11:54:38 2018 -0700
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Tue Jun 5 18:14:12 2018 +0100

    arm: vgic: Use find_first_bit instead of find_next_bit when possible
    
    find_next_bit(foo, sz, 0) is equivalent to find_first_bit(foo, sz). The
    latter is easier to understand. Some architecture may also have a
    optimized version of find_first_bit(...). So replace the occurrence of
    find_next_bit in vgic_vcpu_pending_irq()."
    
    Signed-off-by: Artem Mygaiev <artem_mygaiev@xxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/gic-vgic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c
index d831b35525..fd63906e9b 100644
--- a/xen/arch/arm/gic-vgic.c
+++ b/xen/arch/arm/gic-vgic.c
@@ -362,7 +362,7 @@ int vgic_vcpu_pending_irq(struct vcpu *v)
     ASSERT(v == current);
 
     mask_priority = gic_hw_ops->read_vmcr_priority();
-    active_priority = find_next_bit(&apr, 32, 0);
+    active_priority = find_first_bit(&apr, 32);
 
     spin_lock_irqsave(&v->arch.vgic.lock, flags);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.