From: Tony Nguyen Date: Thu, 17 Aug 2023 16:59:01 +0000 (-0700) Subject: ice: Utilize assign_bit() helper X-Git-Tag: v6.6.17~4098^2~81^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54e852da07150b40de2d451618a557338ae98061;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c index 20c4bea..b959312 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); } /**