lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH-L+nPBf2RNM2=ec1H1WN4DOwfvp5nQAwcfLW4NiTNU_Kk4rQ@mail.gmail.com>
Date: Fri, 29 Mar 2024 14:05:20 +0530
From: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
To: Michal Schmidt <mschmidt@...hat.com>
Cc: intel-wired-lan@...ts.osuosl.org, 
	Jesse Brandeburg <jesse.brandeburg@...el.com>, Tony Nguyen <anthony.l.nguyen@...el.com>, 
	Richard Cochran <richardcochran@...il.com>, netdev@...r.kernel.org, 
	Jacob Keller <jacob.e.keller@...el.com>, Jiri Pirko <jiri@...nulli.us>, 
	Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>, 
	Karol Kolacinski <karol.kolacinski@...el.com>, Marcin Szycik <marcin.szycik@...ux.intel.com>, 
	Przemek Kitszel <przemyslaw.kitszel@...el.com>, 
	"Temerkhanov, Sergey" <sergey.temerkhanov@...el.com>
Subject: Re: [PATCH net-next v4 3/3] ice: fold ice_ptp_read_time into ice_ptp_gettimex64

On Tue, Mar 26, 2024 at 6:07 AM Michal Schmidt <mschmidt@...hat.com> wrote:
>
> This is a cleanup. It is unnecessary to have this function just to call
> another function.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> Signed-off-by: Michal Schmidt <mschmidt@...hat.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_ptp.c | 25 +++---------------------
>  1 file changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
> index 0875f37add78..0f17fc1181d2 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
> @@ -1166,26 +1166,6 @@ static void ice_ptp_reset_cached_phctime(struct ice_pf *pf)
>         ice_ptp_mark_tx_tracker_stale(&pf->ptp.port.tx);
>  }
>
> -/**
> - * ice_ptp_read_time - Read the time from the device
> - * @pf: Board private structure
> - * @ts: timespec structure to hold the current time value
> - * @sts: Optional parameter for holding a pair of system timestamps from
> - *       the system clock. Will be ignored if NULL is given.
> - *
> - * This function reads the source clock registers and stores them in a timespec.
> - * However, since the registers are 64 bits of nanoseconds, we must convert the
> - * result to a timespec before we can return.
> - */
> -static void
> -ice_ptp_read_time(struct ice_pf *pf, struct timespec64 *ts,
> -                 struct ptp_system_timestamp *sts)
> -{
> -       u64 time_ns = ice_ptp_read_src_clk_reg(pf, sts);
> -
> -       *ts = ns_to_timespec64(time_ns);
> -}
> -
>  /**
>   * ice_ptp_write_init - Set PHC time to provided value
>   * @pf: Board private structure
> @@ -1926,9 +1906,10 @@ ice_ptp_gettimex64(struct ptp_clock_info *info, struct timespec64 *ts,
>                    struct ptp_system_timestamp *sts)
>  {
>         struct ice_pf *pf = ptp_info_to_pf(info);
> +       u64 time_ns;
>
> -       ice_ptp_read_time(pf, ts, sts);
> -
> +       time_ns = ice_ptp_read_src_clk_reg(pf, sts);
> +       *ts = ns_to_timespec64(time_ns);
>         return 0;
>  }
>
> --
> 2.43.2
>
>


-- 
Regards,
Kalesh A P

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4239 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ