All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nicolas Pitre <nico@fluxnic.net>, Saeed Mahameed <saeedm@mellanox.com>
Cc: "masahiroy\@kernel.org" <masahiroy@kernel.org>,
	"Laurent.pinchart\@ideasonboard.com" 
	<Laurent.pinchart@ideasonboard.com>,
	"airlied\@linux.ie" <airlied@linux.ie>,
	"jgg\@ziepe.ca" <jgg@ziepe.ca>,
	"linux-kbuild\@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
	"linux-rdma\@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jernej.skrabec\@siol.net" <jernej.skrabec@siol.net>,
	"arnd\@arndb.de" <arnd@arndb.de>,
	"netdev\@vger.kernel.org" <netdev@vger.kernel.org>,
	"jonas\@kwiboo.se" <jonas@kwiboo.se>,
	"kieran.bingham+renesas\@ideasonboard.com" 
	<kieran.bingham+renesas@ideasonboard.com>,
	"narmstrong\@baylibre.com" <narmstrong@baylibre.com>,
	"leon\@kernel.org" <leon@kernel.org>
Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword
Date: Wed, 22 Apr 2020 11:51:23 +0300	[thread overview]
Message-ID: <871rofdhtg.fsf@intel.com> (raw)
In-Reply-To: <nycvar.YSQ.7.76.2004211411500.2671@knanqh.ubzr>

On Tue, 21 Apr 2020, Nicolas Pitre <nico@fluxnic.net> wrote:
> On Tue, 21 Apr 2020, Saeed Mahameed wrote:
>
>> On Tue, 2020-04-21 at 09:58 -0400, Nicolas Pitre wrote:
>> > On Tue, 21 Apr 2020, Saeed Mahameed wrote:
>> > 
>> > > I wonder how many of those 8889 cases wanted a weak dependency but
>> > > couldn't figure out how to do it ? 
>> > > 
>> > > Users of depends on FOO || !FOO
>> > > 
>> > > $ git ls-files | grep Kconfig | xargs grep -E \
>> > >   "depends\s+on\s+([A-Za-z0-9_]+)\s*\|\|\s*(\!\s*\1|\1\s*=\s*n)" \
>> > >  | wc -l
>> > > 
>> > > 156
>> > > 
>> > > a new keyword is required :) .. 
>> > > 
>> > > 
>> > > > In another mail I suggested
>> > > > 
>> > > > 	optionally depends on FOO
>> > > > 
>> > > > might be a better alternative than "uses".
>> > > > 
>> > > > 
>> > > 
>> > > how about just:
>> > >       optional FOO
>> > > 
>> > > It is clear and easy to document .. 
>> > 
>> > I don't dispute your argument for having a new keyword. But the most 
>> > difficult part as Arnd said is to find it. You cannot pretend that 
>> 
>> kconfig-language.rst  ?
>> 
>> > "optional FOO" is clear when it actually imposes a restriction when 
>> > FOO=m. Try to justify to people why they cannot select y because of
>> > this 
>> > "optional" thing.
>> > 
>> 
>> Then let's use "uses" it is more assertive. Documentation will cover
>> any vague anything about it .. 
>
> It uses what? And why can't I configure this with "uses FOO" when FOO=m?
> That's not any clearer. And saying that "this is weird but it is 
> described in the documentation" is not good enough. We must make things 
> clear in the first place.
>
> This is really a conditional dependency. That's all this is about.
> So why not simply making it so rather than fooling ourselves? All that 
> is required is an extension that would allow:
>
> 	depends on (expression) if (expression)
>
> This construct should be obvious even without reading the doc, is 
> already used extensively for other things already, and is flexible 
> enough to cover all sort of cases in addition to this particular one.

Okay, you convinced me. Now you only need to convince whoever is doing
the actual work of implementing this stuff. ;)

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nicolas Pitre <nico@fluxnic.net>, Saeed Mahameed <saeedm@mellanox.com>
Cc: "masahiroy@kernel.org" <masahiroy@kernel.org>,
	"Laurent.pinchart@ideasonboard.com"
	<Laurent.pinchart@ideasonboard.com>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jernej.skrabec@siol.net" <jernej.skrabec@siol.net>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"jonas@kwiboo.se" <jonas@kwiboo.se>,
	"kieran.bingham+renesas@ideasonboard.com"
	<kieran.bingham+renesas@ideasonboard.com>,
	"narmstrong@baylibre.com" <narmstrong@baylibre.com>,
	"leon@kernel.org" <leon@kernel.org>
Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword
Date: Wed, 22 Apr 2020 11:51:23 +0300	[thread overview]
Message-ID: <871rofdhtg.fsf@intel.com> (raw)
In-Reply-To: <nycvar.YSQ.7.76.2004211411500.2671@knanqh.ubzr>

On Tue, 21 Apr 2020, Nicolas Pitre <nico@fluxnic.net> wrote:
> On Tue, 21 Apr 2020, Saeed Mahameed wrote:
>
>> On Tue, 2020-04-21 at 09:58 -0400, Nicolas Pitre wrote:
>> > On Tue, 21 Apr 2020, Saeed Mahameed wrote:
>> > 
>> > > I wonder how many of those 8889 cases wanted a weak dependency but
>> > > couldn't figure out how to do it ? 
>> > > 
>> > > Users of depends on FOO || !FOO
>> > > 
>> > > $ git ls-files | grep Kconfig | xargs grep -E \
>> > >   "depends\s+on\s+([A-Za-z0-9_]+)\s*\|\|\s*(\!\s*\1|\1\s*=\s*n)" \
>> > >  | wc -l
>> > > 
>> > > 156
>> > > 
>> > > a new keyword is required :) .. 
>> > > 
>> > > 
>> > > > In another mail I suggested
>> > > > 
>> > > > 	optionally depends on FOO
>> > > > 
>> > > > might be a better alternative than "uses".
>> > > > 
>> > > > 
>> > > 
>> > > how about just:
>> > >       optional FOO
>> > > 
>> > > It is clear and easy to document .. 
>> > 
>> > I don't dispute your argument for having a new keyword. But the most 
>> > difficult part as Arnd said is to find it. You cannot pretend that 
>> 
>> kconfig-language.rst  ?
>> 
>> > "optional FOO" is clear when it actually imposes a restriction when 
>> > FOO=m. Try to justify to people why they cannot select y because of
>> > this 
>> > "optional" thing.
>> > 
>> 
>> Then let's use "uses" it is more assertive. Documentation will cover
>> any vague anything about it .. 
>
> It uses what? And why can't I configure this with "uses FOO" when FOO=m?
> That's not any clearer. And saying that "this is weird but it is 
> described in the documentation" is not good enough. We must make things 
> clear in the first place.
>
> This is really a conditional dependency. That's all this is about.
> So why not simply making it so rather than fooling ourselves? All that 
> is required is an extension that would allow:
>
> 	depends on (expression) if (expression)
>
> This construct should be obvious even without reading the doc, is 
> already used extensively for other things already, and is flexible 
> enough to cover all sort of cases in addition to this particular one.

Okay, you convinced me. Now you only need to convince whoever is doing
the actual work of implementing this stuff. ;)

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2020-04-22  8:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  1:11 [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword Saeed Mahameed
2020-04-17  1:11 ` [RFC PATCH 2/2] net/mlx5: Kconfig: Use "uses" instead of "imply" Saeed Mahameed
2020-04-17  8:08   ` Arnd Bergmann
2020-04-17  6:23 ` [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword Jani Nikula
2020-04-17  6:23   ` Jani Nikula
2020-04-17 12:28   ` Jason Gunthorpe
2020-04-17 14:01     ` Jani Nikula
2020-04-17 14:07       ` Jason Gunthorpe
2020-04-17 10:24 ` Arnd Bergmann
2020-04-17 11:35   ` Saeed Mahameed
2020-04-17 11:35     ` Saeed Mahameed
2020-04-18 19:00 ` Masahiro Yamada
2020-04-18 19:11   ` Nicolas Pitre
2020-04-18 20:07     ` Masahiro Yamada
2020-04-20  8:43       ` Jani Nikula
2020-04-20 18:42         ` Jakub Kicinski
2020-04-21  4:24         ` Saeed Mahameed
2020-04-21  4:24           ` Saeed Mahameed
2020-04-21 13:58           ` Nicolas Pitre
2020-04-21 13:58             ` Nicolas Pitre
2020-04-21 16:30             ` Saeed Mahameed
2020-04-21 16:30               ` Saeed Mahameed
2020-04-21 18:23               ` Nicolas Pitre
2020-04-21 18:23                 ` Nicolas Pitre
2020-04-22  8:51                 ` Jani Nikula [this message]
2020-04-22  8:51                   ` Jani Nikula
2020-04-22 21:13                   ` Nicolas Pitre
2020-04-22 21:13                     ` Nicolas Pitre
2020-04-22 22:37                     ` Randy Dunlap
2020-04-22 22:37                       ` Randy Dunlap
2020-04-23 15:01                       ` Nicolas Pitre
2020-04-23 15:01                         ` Nicolas Pitre
2020-04-23 15:05                         ` Jason Gunthorpe
2020-04-23 15:05                           ` Jason Gunthorpe
2020-04-23 15:11                           ` Nicolas Pitre
2020-04-23 15:11                             ` Nicolas Pitre
2020-04-23 15:16                             ` Jason Gunthorpe
2020-04-23 15:16                               ` Jason Gunthorpe
2020-04-23 15:28                               ` Arnd Bergmann
2020-04-23 15:28                                 ` Arnd Bergmann
2020-04-23 15:33                               ` Nicolas Pitre
2020-04-23 15:33                                 ` Nicolas Pitre
2020-04-23 18:30                                 ` Jason Gunthorpe
2020-04-23 18:30                                   ` Jason Gunthorpe
2020-04-23 18:52                                   ` Nicolas Pitre
2020-04-23 18:52                                     ` Nicolas Pitre
2020-04-20 13:53   ` Jason Gunthorpe

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=871rofdhtg.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=arnd@arndb.de \
    --cc=jernej.skrabec@siol.net \
    --cc=jgg@ziepe.ca \
    --cc=jonas@kwiboo.se \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=leon@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=saeedm@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.