From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756307AbcIOV5B (ORCPT ); Thu, 15 Sep 2016 17:57:01 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:37232 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753951AbcIOV4x (ORCPT ); Thu, 15 Sep 2016 17:56:53 -0400 Date: Thu, 15 Sep 2016 14:56:49 -0700 From: Josh Triplett To: Nicolas Pitre Cc: Richard Cochran , John Stultz , Thomas Gleixner , lkml Subject: Re: [PATCH v3) posix-timers: make it configurable Message-ID: <20160915215649.GA17171@cloud> References: <20160915210724.GB4245@localhost.localdomain> <20160915211555.GA16992@cloud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 15, 2016 at 05:35:28PM -0400, Nicolas Pitre wrote: > On Thu, 15 Sep 2016, Josh Triplett wrote: > > > On Thu, Sep 15, 2016 at 11:07:24PM +0200, Richard Cochran wrote: > > > On Thu, Sep 15, 2016 at 12:58:22PM -0700, John Stultz wrote: > > > > This doesn't look too bad. > > > > > > I disagree. It looks ugly. If tinification means sprinkling more and > > > more of these conditionals all over the place, then it is going to be > > > a tough sell. > > > > Looking at this particular patch, it does seem a bit much for the > > ability to have PTP without timers. That doesn't seem like a very > > likely combination. Handling that in Kconfig seems fine, unless there's > > a concrete use case for that combination. > > I doubt there is. This is more for randconfig purposes or the like. > > I suspect there is more of a case for having net drivers _without_ ptp > support. This could be implemented with a ptp_clock_register() stub > returning NULL when ptp is not configured. I didn't look at most > drivers but at least broadcom/tg3.c seems to be fine with such an > approach. > > Alternatively, all those ethernet drivers currently selecting > PTP_1588_CLOCK could be banned from the kernel config when POSIX_TIMERS > is not selected. > > What do people prefer? If the stubs prove as simple as you suggest above (a static inline returning NULL), that sounds ideal. If this would require a non-trivial amount of stub code, then preventing those drivers from building without POSIX_TIMERS seems preferable to that.