From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbcISREV (ORCPT ); Mon, 19 Sep 2016 13:04:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55786 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752502AbcISRET (ORCPT ); Mon, 19 Sep 2016 13:04:19 -0400 Date: Mon, 19 Sep 2016 19:04:15 +0200 From: Jiri Benc To: Nicolas Pitre Cc: John Stultz , Thomas Gleixner , Richard Cochran , Josh Triplett , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] ptp_clock: allow for it to be optional Message-ID: <20160919190415.26bd9343@griffin> In-Reply-To: References: <1474257070-4255-1-git-send-email-nicolas.pitre@linaro.org> <1474257070-4255-2-git-send-email-nicolas.pitre@linaro.org> <20160919142553.3fb682ba@griffin> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 19 Sep 2016 17:04:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Sep 2016 10:10:21 -0400 (EDT), Nicolas Pitre wrote: > --- a/include/linux/ptp_clock_kernel.h > +++ b/include/linux/ptp_clock_kernel.h > @@ -207,7 +207,16 @@ int ptp_find_pin(struct ptp_clock *ptp, > #else > static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, > struct device *parent) > -{ return NULL; } > +{ > + if (IS_MODULE(CONFIG_PTP_1588_CLOCK)) { > + pr_warn("%s is built-in while PTP clock subsystem is modular, " > + "PTP clock ignored\n", KBUILD_MODNAME); > + } else { > + pr_warn("ignoring PTP clock from %s as PTP clock subsystem " > + "is configured out\n", KBUILD_MODNAME); > + } > + return NULL; > +} I think the else part is not needed. If PTP is disabled, it is disabled, nobody should be surprised by that. Looks good otherwise. Thanks, Jiri