mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Yann E MORIN <yann.morin.1998@free.fr>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	Josh Triplett <josh@joshtriplett.org>, <netdev@vger.kernel.org>,
	<linux-kbuild@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] kconfig: introduce the "imply" keyword
Date: Thu, 20 Oct 2016 18:41:02 +0100	[thread overview]
Message-ID: <fea29738-142d-0cb8-da85-cf376d1158e7@solarflare.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1610201245230.25105@knanqh.ubzr>

On 20/10/16 18:04, Nicolas Pitre wrote:
> On Thu, 20 Oct 2016, Edward Cree wrote:
>> Also, I don't think having any FOO=y should preclude BAZ=m.  Suppose both
>> FOO and FOO2 imply BAZ, FOO=y and FOO2=m.
> Some people didn't like the fact that you could turn a driver from m to 
> y and silently lose some features if they were provided by a subsystem 
> that also used to be m, which arguably is not the same as being 
> explicitly disabled.  With "select" this is not a problem as the target 
> symbol is also promoted to y in that case, so I wanted to preserve that 
> property.
Right, but that's an argument for pushing the subsystem's default to y,
not for preventing changing the subsystem back to m afterwards.
>> Then if BAZ-features are only
>> desired for driver FOO2, BAz=m makes sense.
> In that case it would make more sense to add a config option related to 
> FOO asking if BAZ features are desired for that driver (there is already 
> one occurrence of that with PTP).  Or you could simply drop the "imply" 
> statement from the FOO config entry.
But the desire is a property of the user, not of the driver.  If you're
willing to add CONFIG_FOO_BAZ to every combination of (driver, subsystem)
then "imply" becomes unnecessary, doesn't it?  Conversely, if you *don't*
want to have to do that, then "imply" needs to only ever deal in defaults,
not in limitations.
>> There is also the case of drivers with the ability to detect at runtime
>> whether BAZ is present, rather than making the decision at build time, but
>> I'm not sure how common that is.
> Right now that's how PTP support is done.  Drivers can optimize things 
> at build time, but most of them simply cope with a NULL return from 
> ptp_clock_register().  Hence the imply statement becomes a big 
> configuration hint rather than some hard build dependency.
Right, so those drivers can use PTP if they're y and PTP is m, as long as
the PTP module is loaded when they probe.  But current "imply" semantics
won't allow that...

I think that Josh's suggestion (have the UI warn you if you set BAZ to m
while FOO=y) is the right approach, but I also think it should be done
now rather than at some unspecified future time.  Otherwise you forbid
potentially valid configs.

-Ed

  reply	other threads:[~2016-10-20 17:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 23:42 [PATCH 0/4] make POSIX timers optional with some Kconfig help Nicolas Pitre
2016-10-19 23:42 ` [PATCH 1/4] kconfig: introduce the "imply" keyword Nicolas Pitre
2016-10-20  6:53   ` Masahiro Yamada
2016-10-20 14:52   ` Edward Cree
2016-10-20 15:38     ` Josh Triplett
2016-10-20 17:04     ` Nicolas Pitre
2016-10-20 17:41       ` Edward Cree [this message]
2016-10-20 18:29         ` Nicolas Pitre
2016-10-20 19:09           ` Edward Cree
2016-10-20 20:10             ` Nicolas Pitre
2016-10-21  3:24               ` Nicolas Pitre
2016-10-19 23:42 ` [PATCH 2/4] kconfig: re-generate *.c_shipped files after previous change Nicolas Pitre
2016-10-19 23:42 ` [PATCH 3/4] ptp_clock: allow for it to be optional Nicolas Pitre
2016-10-20  9:50   ` Thomas Gleixner
2016-10-20 17:47     ` Nicolas Pitre
2016-10-20 17:58       ` Thomas Gleixner
2016-10-20 14:06   ` Richard Cochran
2016-10-20 15:38     ` Josh Triplett
2016-10-20 16:44     ` Nicolas Pitre
2016-10-19 23:42 ` [PATCH 4/4] posix-timers: make it configurable Nicolas Pitre
2016-10-20 14:02   ` Richard Cochran
2016-10-20 16:41     ` Nicolas Pitre
2016-10-20  9:46 ` [PATCH 0/4] make POSIX timers optional with some Kconfig help Thomas Gleixner
2016-10-20 18:35   ` Nicolas Pitre
2016-10-20 18:51 ` Josh Triplett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fea29738-142d-0cb8-da85-cf376d1158e7@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=john.stultz@linaro.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®