aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_vf_lib.c
diff options
context:
space:
mode:
authorTony Nguyen <[email protected]>2023-08-17 16:59:01 +0000
committerTony Nguyen <[email protected]>2023-08-17 20:59:18 +0000
commit54e852da07150b40de2d451618a557338ae98061 (patch)
treeed87e1ef2867d19e2632a5d233a33f419e8a83e6 /drivers/net/ethernet/intel/ice/ice_vf_lib.c
parentice: refactor ice_vf_lib to make functions static (diff)
downloadkernel-54e852da07150b40de2d451618a557338ae98061.tar.gz
kernel-54e852da07150b40de2d451618a557338ae98061.zip
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 <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_vf_lib.c')
-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);
}
/**