Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp477586ybz; Wed, 22 Apr 2020 01:54:52 -0700 (PDT) X-Google-Smtp-Source: APiQypKdHHG5VZ8AJfR9/xmfxoE0zT/M40pbpK1kOmnV8E1RdrnUCwJMpWMSYUHJrHO8iP/7RWZO X-Received: by 2002:a17:906:bfc9:: with SMTP id us9mr10673384ejb.84.1587545692822; Wed, 22 Apr 2020 01:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587545692; cv=none; d=google.com; s=arc-20160816; b=voDvF11fSQxkHDaUi1lgEJGLn08d2KX/kSJXktwGQDGc5sEMRkIEWXK7TwdA1P5qVn V/9d+ofO22iTg2jL9HUPE7exNXJvLgeCyHFjX97dwQVPWfd1jEj8EDO0h3SD9OqNRvJI /DPKclYatoD/ksgcvzcvpgML3oGPBwfsxwBUAV3JC+T0KVMSQxhPD04RK/wwa+6+8xLv 89mgx1rLBajtqLTHOKbypCYgzhe1wg/WFHZbH8OIIyl7vQLNnINgt4oMxoSerNIhtsJd rIul6WI6s4jEtFASJTBiEZjPK//L6pYjHT0ZvgVgpEpti3PZ05726+if0gzPuI6+5xbr bfVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=W3qnYHV3uzpaEKi3xmgUY1b09ROIJJx+FH6INsbMnc4=; b=MXZtJ390/+9M2oWx2774lo8xj6nybMg2miuI6xgJaMC09YhHdNgRxWNHV95uTo9uwm 33i7QPpPCSmUxkqel1jb8Rf3zOkTuXUqqtLYOqfZCWIkpidUO5rgUXwfk/gFucYXlboH t6mqPXo9kYVLK9kQsFUZ7Z++PGUvVnNIfEGUmLAujmlURbCOFP6JEqlmJfXcn6l6wjQO LOFlmLjmJMWuiTMTqMjg3whpXLqrDYL+QLoEux2jQjK0rvNdZUGX0r4Ucn7kW8cZhoiS X4CVLEVFMdAY6P2lkJ7hLGwoCLDBxpCmSKbEw0AQqdiEpZsMebR6Gm+FdxpvICIT3Sn+ UXaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si3060669eja.417.2020.04.22.01.54.30; Wed, 22 Apr 2020 01:54:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgDVIvd (ORCPT + 99 others); Wed, 22 Apr 2020 04:51:33 -0400 Received: from mga07.intel.com ([134.134.136.100]:25276 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725836AbgDVIvd (ORCPT ); Wed, 22 Apr 2020 04:51:33 -0400 IronPort-SDR: ZL2NothgWWaBiAwlK/g8jTemutKBriuxRq6bJFESvNmeggO2SYYr3ZxWnSkE1dfyph+uDO5tcy xSNYum4yatcQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 01:51:32 -0700 IronPort-SDR: iiv9b5p61LMYigVzyFdTkQemYR7HU3IMtiYvZn9eGn3HMisMF8oWZD2CKWBPVjSpWMmXzF6OF9 B2qyHLlj8y5g== X-IronPort-AV: E=Sophos;i="5.72,413,1580803200"; d="scan'208";a="429836132" Received: from otekdur-mobl.ger.corp.intel.com (HELO localhost) ([10.252.44.229]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 01:51:26 -0700 From: Jani Nikula To: Nicolas Pitre , Saeed Mahameed Cc: "masahiroy\@kernel.org" , "Laurent.pinchart\@ideasonboard.com" , "airlied\@linux.ie" , "jgg\@ziepe.ca" , "linux-kbuild\@vger.kernel.org" , "linux-rdma\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , "jernej.skrabec\@siol.net" , "arnd\@arndb.de" , "netdev\@vger.kernel.org" , "jonas\@kwiboo.se" , "kieran.bingham+renesas\@ideasonboard.com" , "narmstrong\@baylibre.com" , "leon\@kernel.org" Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20200417011146.83973-1-saeedm@mellanox.com> <87v9lu1ra6.fsf@intel.com> <45b9efec57b2e250e8e39b3b203eb8cee10cb6e8.camel@mellanox.com> <62a51b2e5425a3cca4f7a66e2795b957f237b2da.camel@mellanox.com> Date: Wed, 22 Apr 2020 11:51:23 +0300 Message-ID: <871rofdhtg.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Apr 2020, Nicolas Pitre 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