[lkml]   [2022]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 07/49] KVM: x86: replace bitmap_weight with bitmap_empty where appropriate
On Thu, Feb 10, 2022, Yury Norov wrote:
> In some places kvm/hyperv.c code calls bitmap_weight() to check if any bit
> of a given bitmap is set. It's better to use bitmap_empty() in that case
> because bitmap_empty() stops traversing the bitmap as soon as it finds
> first set bit, while bitmap_weight() counts all bits unconditionally.
> Signed-off-by: Yury Norov <>
> Reviewed-by: Vitaly Kuznetsov <>
> ---

Reviewed-by: Sean Christopherson <>

 \ /
  Last update: 2022-02-11 17:36    [W:0.467 / U:2.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site