[Intel-wired-lan] [net-next PATCH 25/25] ice: remove PF pointer from ice_check_vf_init

Jankowski, Konrad0 konrad0.jankowski at intel.com
Wed Mar 2 19:40:55 UTC 2022



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Jacob Keller
> Sent: Wednesday, February 23, 2022 1:27 AM
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
> Subject: [Intel-wired-lan] [net-next PATCH 25/25] ice: remove PF pointer
> from ice_check_vf_init
> 
> The ice_check_vf_init function takes both a PF and a VF pointer. Every caller
> looks up the PF pointer from the VF structure. Some callers only use of the
> PF pointer is call this function. Move the lookup inside ice_check_vf_init and
> drop the unnecessary argument.
> 
> Cleanup the callers to drop the now unnecessary local variables. In particular,
> replace the local PF pointer with a HW structure pointer in
> ice_vc_get_vf_res_msg which simplifies a few accesses to the HW structure
> in that function.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_vf_lib.c      | 16 +++++++---------
>  .../net/ethernet/intel/ice/ice_vf_lib_private.h  |  2 +-
>  drivers/net/ethernet/intel/ice/ice_virtchnl.c    | 12 ++++++------
>  3 files changed, 14 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c
> b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
> index c584f5123ba7..6578059d9479 100644
> --- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
> @@ -174,15 +174,12 @@ static void ice_wait_on_vf_reset(struct ice_vf *vf)

Tested-by: Konrad Jankowski <konrad0.jankowski at intel.com>


More information about the Intel-wired-lan mailing list