[PATCH 1/4] xen/evtchn: Use bitmap_for_each() in evtchn_check_pollers()

Andrew Cooper posted 4 patches 2 months, 3 weeks ago
[PATCH 1/4] xen/evtchn: Use bitmap_for_each() in evtchn_check_pollers()
Posted by Andrew Cooper 2 months, 3 weeks ago
It is a preprocessor-identical opencoding.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
---
 xen/common/event_channel.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 13b97c94d7fa..8db2ca4ba23e 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -1517,9 +1517,7 @@ void evtchn_check_pollers(struct domain *d, unsigned int port)
         return;
 
     /* Wake any interested (or potentially interested) pollers. */
-    for ( vcpuid = find_first_bit(d->poll_mask, d->max_vcpus);
-          vcpuid < d->max_vcpus;
-          vcpuid = find_next_bit(d->poll_mask, d->max_vcpus, vcpuid+1) )
+    bitmap_for_each ( vcpuid, d->poll_mask, d->max_vcpus )
     {
         v = d->vcpu[vcpuid];
         if ( ((v->poll_evtchn <= 0) || (v->poll_evtchn == port)) &&
-- 
2.39.2
Re: [PATCH 1/4] xen/evtchn: Use bitmap_for_each() in evtchn_check_pollers()
Posted by Jan Beulich 2 months, 3 weeks ago
On 27.08.2024 15:57, Andrew Cooper wrote:
> It is a preprocessor-identical opencoding.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>