[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <beb21f5d-1999-471a-be63-b469f0dde96d@intel.com>
Date: Wed, 26 Jun 2024 14:05:01 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Sergey Temerkhanov <sergey.temerkhanov@...el.com>
CC: <netdev@...r.kernel.org>, <intel-wired-lan@...ts.osuosl.org>, "Michal
Schmidt" <mschmidt@...hat.com>
Subject: Re: [PATCH iwl-next v1 2/4] ice: Add ice_get_ctrl_ptp() wrapper to
simplify the code
On 6/26/24 12:03, Sergey Temerkhanov wrote:
> Add ice_get_ctrl_ptp() wrapper to simplify the PTP support code
> in the functions that do not use ctrl_pf directly
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ptp.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
> index 2f32dcd42581..8f9a449a851c 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
> @@ -16,6 +16,18 @@ static const struct ptp_pin_desc ice_pin_desc_e810t[] = {
> { "U.FL2", UFL2, PTP_PF_NONE, 2, { 0, } },
> };
>
> +static struct ice_pf *ice_get_ctrl_pf(struct ice_pf *pf)
> +{
> + return !pf->adapter ? NULL : pf->adapter->ctrl_pf;
As Michal has pointed out, this field is not yet added by you at this
(patch2/4) point.
Please fix and send next version as "v2".
> +}
> +
> +static struct ice_ptp *ice_get_ctrl_ptp(struct ice_pf *pf)
> +{
> + struct ice_pf *ctrl_pf = ice_get_ctrl_pf(pf);
> +
> + return !ctrl_pf ? NULL : &ctrl_pf->ptp;
> +}
> +
> /**
> * ice_get_sma_config_e810t
> * @hw: pointer to the hw struct
Powered by blists - more mailing lists