From: Yury Norov Date: Mon, 2 Mar 2026 01:11:57 +0000 (-0500) Subject: ice: use bitmap_empty() in ice_vf_has_no_qs_ena X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82e68aa4a6b16aa060d5044116dac957631cf6f0;p=thirdparty%2Fkernel%2Flinux.git ice: use bitmap_empty() in ice_vf_has_no_qs_ena bitmap_empty() is more verbose and efficient, as it stops traversing {r,t}xq_ena as soon as the 1st set bit found. Tested-by: Rafal Romanowski Reviewed-by: Aleksandr Loktionov Reviewed-by: Jacob Keller Signed-off-by: Yury Norov --- diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c index c8bc952f05cdb..772f6b07340d4 100644 --- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c @@ -1210,8 +1210,8 @@ bool ice_is_vf_trusted(struct ice_vf *vf) */ bool ice_vf_has_no_qs_ena(struct ice_vf *vf) { - return (!bitmap_weight(vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF) && - !bitmap_weight(vf->txq_ena, ICE_MAX_RSS_QS_PER_VF)); + return bitmap_empty(vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF) && + bitmap_empty(vf->txq_ena, ICE_MAX_RSS_QS_PER_VF); } /**