mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
ice: use bitmap_weighted_xor() in ice_find_free_recp_res_idx()
Use the right helper and save one bitmaps traverse. Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Yury Norov <ynorov@nvidia.com>
This commit is contained in:
parent
d57e74f104
commit
bdeaa653ae
|
|
@ -4984,10 +4984,8 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const unsigned long *profiles,
|
|||
hw->switch_info->recp_list[bit].res_idxs,
|
||||
ICE_MAX_FV_WORDS);
|
||||
|
||||
bitmap_xor(free_idx, used_idx, possible_idx, ICE_MAX_FV_WORDS);
|
||||
|
||||
/* return number of free indexes */
|
||||
return (u16)bitmap_weight(free_idx, ICE_MAX_FV_WORDS);
|
||||
return (u16)bitmap_weighted_xor(free_idx, used_idx, possible_idx, ICE_MAX_FV_WORDS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user