Subject: Re: [PATCH net-next] mlxsw: update adjfine to use adjust_by_scaled_ppm

From: Ido Schimmel <[email-masked]>
Date: Tue, 15 Nov 2022 11:23:53 +0200

On Mon, Nov 14, 2022 at 01:37:01PM -0800, Jacob Keller wrote:
> The mlxsw adjfine implementation in the spectrum_ptp.c file converts
> scaled_ppm into ppb before updating a cyclecounter multiplier using the
> standard "base * ppb / 1billion" calculation.
> 
> This can be re-written to use adjust_by_scaled_ppm, directly using the
> scaled parts per million and reducing the amount of code required to
> express this calculation.
> 
> We still calculate the parts per billion for passing into
> mlxsw_sp_ptp_phc_adjfreq because this function requires the input to be in
> parts per billion.
> 
> Signed-off-by: Jacob Keller <[email-masked]>
> Cc: Amit Cohen <[email-masked]>
> Cc: Ido Schimmel <[email-masked]>
> Cc: Petr Machata <[email-masked]>

Thanks for the patch, code looks good to me.

Petr, please apply this patch to our tree for testing.