From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752359AbdAMPhq (ORCPT ); Fri, 13 Jan 2017 10:37:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928AbdAMPho (ORCPT ); Fri, 13 Jan 2017 10:37:44 -0500 From: Vitaly Kuznetsov To: Olaf Hering Cc: Thomas Gleixner , devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, Haiyang Zhang , "K. Y. Srinivasan" , John Stultz , Alex Ng , Stephen Hemminger Subject: Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source References: <20170113130543.7212-1-vkuznets@redhat.com> <20170113152126.GA31625@aepfle.de> Date: Fri, 13 Jan 2017 16:37:41 +0100 In-Reply-To: <20170113152126.GA31625@aepfle.de> (Olaf Hering's message of "Fri, 13 Jan 2017 16:21:26 +0100") Message-ID: <871sw72coq.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 13 Jan 2017 15:37:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Olaf Hering 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