[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240614103728.GB8447@kernel.org>
Date: Fri, 14 Jun 2024 11:37:28 +0100
From: Simon Horman <horms@...nel.org>
To: Jesse Brandeburg <jesse.brandeburg@...el.com>
Cc: netdev@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
corbet@....net, linux-doc@...r.kernel.org,
Jacob Keller <jacob.e.keller@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH iwl-next v2 5/5] ice: refactor to use helpers
On Thu, Jun 06, 2024 at 03:46:59PM -0700, Jesse Brandeburg wrote:
> Use the ice_netdev_to_pf() helper in more places and remove a bunch of
> boilerplate code. Not every instance could be replaced due to use of the
> netdev_priv() output or the vsi variable within a bunch of functions.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> Reviewed-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
Hi Jesse,
The minor nit below notwithstanding, this looks good to me.
Reviewed-by: Simon Horman <horms@...nel.org>
...
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
...
> @@ -938,9 +931,8 @@ static int ice_lbtest_receive_frames(struct ice_rx_ring *rx_ring)
> */
> static u64 ice_loopback_test(struct net_device *netdev)
> {
> - struct ice_netdev_priv *np = netdev_priv(netdev);
> - struct ice_vsi *orig_vsi = np->vsi, *test_vsi;
> - struct ice_pf *pf = orig_vsi->back;
> + struct ice_pf *pf = ice_netdev_to_pf(netdev);
> + struct ice_vsi *test_vsi;
> u8 *tx_frame __free(kfree) = NULL;
> u8 broadcast[ETH_ALEN], ret = 0;
> int num_frames, valid_frames;
nit: If you end up respinning for some other reason,
please consider arranging things reverse xmas tree order here.
...
Powered by blists - more mailing lists