summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTony Nguyen <anthony.l.nguyen@intel.com>2023-08-17 09:59:01 -0700
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-08-17 13:59:18 -0700
commit54e852da07150b40de2d451618a557338ae98061 (patch)
treeed87e1ef2867d19e2632a5d233a33f419e8a83e6 /drivers
parentcc9c60c9edfed4fa629975848e80a45c17332b9a (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_vf_lib.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
index 20c4beaa05d8..b95931272b16 100644
--- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
@@ -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);
}
/**