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 <rafal.romanowski@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
master
Yury Norov 2026-03-01 20:11:57 -05:00
parent bdeaa653ae
commit 82e68aa4a6
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
/**