Re: [PATCH net-next 1/3] ptp: Add adjphase function to support phase offset control.

From: Vincent Cheng
Date: Fri May 01 2020 - 09:48:45 EST


On Thu, Apr 30, 2020 at 11:37:34PM EDT, Richard Cochran wrote:
>On Wed, Apr 29, 2020 at 08:28:23PM -0400, vincent.cheng.xh@xxxxxxxxxxx wrote:
>> diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
>> index acabbe7..c46ff98 100644
>> --- a/drivers/ptp/ptp_clock.c
>> +++ b/drivers/ptp/ptp_clock.c
>> @@ -146,6 +146,8 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct __kernel_timex *tx)
>> else
>> err = ops->adjfreq(ops, ppb);
>> ptp->dialed_frequency = tx->freq;
>> + } else if (tx->modes & ADJ_OFFSET) {
>> + err = ops->adjphase(ops, tx->offset);
>
>This is a new method, and no drivers have it, so there must be a check
>that the function pointer is non-null.

Yes, good point. Will fix and resubmit.

Thanks,
Vincent