Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

From: Vitaly Kuznetsov
Date: Fri Jan 13 2017 - 10:37:50 EST


Olaf Hering <olaf@xxxxxxxxx> writes:

> On Fri, Jan 13, Vitaly Kuznetsov wrote:
>
>> + hv_ptp_clock = ptp_clock_register(&ptp_hyperv_info, NULL);
>> + if (IS_ERR(hv_ptp_clock)) {
>
> Should that be IS_ERR_OR_NULL to catch "!IS_REACHABLE(CONFIG_PTP_1588_CLOCK)"?
>

Oh, yes. I missed the case when CONFIG_PTP_1588_CLOCK is disabled
completely. I'll also remove the return below to not fail the device
completely. Even if there is no PTP support in kernel the
ICTIMESYNCFLAG_SYNC case which triggers do_settimeofday64() is still
probably useful.

--
Vitaly