ice: Utilize assign_bit() helper
The if/else check for bit setting can be replaced by using the assign_bit() helper so do so. Suggested-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
cc9c60c9ed
commit
54e852da07
|
@ -407,10 +407,7 @@ static int ice_vf_rebuild_host_tx_rate_cfg(struct ice_vf *vf)
|
|||
*/
|
||||
static void ice_vf_set_host_trust_cfg(struct ice_vf *vf)
|
||||
{
|
||||
if (vf->trusted)
|
||||
set_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
|
||||
else
|
||||
clear_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
|
||||
assign_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps, vf->trusted);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue