Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3799467ybz; Mon, 20 Apr 2020 09:39:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJohlaWctoBNZFTzwM6xs4kqAhjkp9NxgbMYEMYCg/4wAgWZx3bhHqK8Q1nvBa5nUJyp8Vr X-Received: by 2002:a05:6402:391:: with SMTP id o17mr9252531edv.71.1587400752369; Mon, 20 Apr 2020 09:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587400752; cv=none; d=google.com; s=arc-20160816; b=ZjxUW2xx6Z1bY87sLlTDmpax+nrpN6RugJYnoDSc7kK1+reJrBu/40XFJKNT0ME2qX o3M78cNyoXfhaNvn4WASAHbfaEsZv2O3tO+NWQgykTWtJWaxiJX5ZxGtm2As/FKSoSZz TojH2plvTuGnHMRKJJuP2/XuwCf0ErwpSOXXKjahbTmEe7KhY6jcSGRbSX38ej6N39iI 8IWBjxQW4qI9gmeYyBI5iZTIM0Vdyg91oKnDiPtEBDqmzaNpSjSAJgGotaeiz8Y0SD+W QwMQj36fYuTJP6baKlIv09quJ1GccOB4bQa7y6WIrw6iMCbte3EnHsKwyw+GVFWuOnqK +eSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o13LKn2rJ4UJRW2h0bHPO25xmhuYtNcawFVc7d+lgRo=; b=beEmV/16FhZztq/Bu58sNYLiSp5BB6qw//IlGzFg/t0hfQZsauxw2NeWdMWpXdEeAJ QTRlJV1fC93fi4VaGiaaymZCl4nQTXlgWJLzkmPbqO2Wje5eKERCrpCg2j8qTg5B4Bnv g5qibJuDn9W+TNP35da+tZkakSSE1HQE/Bvp9d2CgJJmS2KgrP0cKTXahdZ34p44kvXq KCThG8B0j5918h8aSnCo7FaUOjfQZNMF4eoj951p02nDqryRfAbNHbIpGq7weSmff8SU HQ+vn27lBN7jaTeBTvd5LqyB1xzVnPd74xNwLiNBDr3K/fc5MmHtaZfyOYws9hPkEW8F 8MSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=XZ0QzRtY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si796596edr.491.2020.04.20.09.38.48; Mon, 20 Apr 2020 09:39:12 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=XZ0QzRtY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726673AbgDTNxR (ORCPT + 99 others); Mon, 20 Apr 2020 09:53:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727780AbgDTNxR (ORCPT ); Mon, 20 Apr 2020 09:53:17 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F04D4C061A41 for ; Mon, 20 Apr 2020 06:53:16 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id o19so10568130qkk.5 for ; Mon, 20 Apr 2020 06:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=o13LKn2rJ4UJRW2h0bHPO25xmhuYtNcawFVc7d+lgRo=; b=XZ0QzRtY25nEU44AD6pxDnkqb8l9QSmUK6ijcSmpjmSIiOt930jssLLchxgYVBCReC kvYOxln/nTnQQL7H2lKTWo6IXjD3qn+zcWML+FsuFwe/qTLF0+lzQRa4i76CpOezVmAT 6hZftVtcfPfRamgioSFKBVcYiQO08xyeQ+qDvTH48MqKN7VflkvGm6h4Inti4Omg4pBU 8S5JLyQ3B1HArKJ1F4j4BZ+Ze4inRaNI9T3ClS8676Q8+g9apTVesyJEzQupy1dc+tp5 1tInQ3pj1/10OXIXsRtRMYg+qjDqrC8VjbnL0Vt6r2OvV6sFo96gKXHgQMZq/WcDGFla o0Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=o13LKn2rJ4UJRW2h0bHPO25xmhuYtNcawFVc7d+lgRo=; b=HKsruOQqVPD8wp5fUZKQo4OxiurPbzBP41HkbbXdNKJlDp80fjuMgYeM3nVwywkHo2 gXHzTbbTWzLf9z4hKN4nF7uVQ2PShn3vpFO/C2WDCvOfrHm9ecajXkGjDrRzygq6LRst 8I/HzdIqKehNSWZPSlGB+rGQLi6fMCItKNfofZbTROl66gs8KHPv0pYOt1L04R2vaOiL 99oBd12vuo1I2xeqdfXToAqTe0mkd9kUhbXHzNS0ssTet2FUY1HMCD5KfUfS9G1x+pww JXeaj7BIbP/pwVLobI7tRGb5mxRdxO/yUZHDJMSR+YooQ5AEtA0DXfeWA252fbdazTeX pErg== X-Gm-Message-State: AGi0PuZbQFVtA00fPjF39mfBev9uKZf8D9puYOrn9u3QVym/+29DjlZq 5eW0Kcy8/oFn+nH3FsDjpWXFIJvkV0LPMA== X-Received: by 2002:a37:65c3:: with SMTP id z186mr15820182qkb.484.1587390796111; Mon, 20 Apr 2020 06:53:16 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id n124sm595348qkn.136.2020.04.20.06.53.13 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Apr 2020 06:53:14 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jQWrJ-0002Xf-Co; Mon, 20 Apr 2020 10:53:13 -0300 Date: Mon, 20 Apr 2020 10:53:13 -0300 From: Jason Gunthorpe To: Masahiro Yamada Cc: Saeed Mahameed , Linux Kbuild mailing list , Arnd Bergmann , Nicolas Pitre , Jani Nikula , Neil Armstrong , Laurent Pinchart , Leon Romanovsky , Kieran Bingham , jonas@kwiboo.se, David Airlie , jernej.skrabec@siol.net, Linux Kernel Mailing List , Networking , linux-rdma@vger.kernel.org Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword Message-ID: <20200420135313.GN26002@ziepe.ca> References: <20200417011146.83973-1-saeedm@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 19, 2020 at 04:00:43AM +0900, Masahiro Yamada wrote: > People would wonder, "what 'uses FOO' means?", > then they would find the explanation in kconfig-language.rst: > > "Equivalent to: depends on symbol || !symbol > Semantically it means, if FOO is enabled (y/m) and has the option: > uses BAR, make sure it can reach/use BAR when possible." > > To understand this correctly, people must study > the arithmetic of (symbol || !symbol) anyway. I think people will just cargo-cult copy it and not think too hard about how kconfig works. The descriptions in kconfig-language.rst can be improved to better guide C people using kconfig without entirely understanding it. Something like: BAR depends on FOO // BAR selects FOO: BAR requires functionality from FOO BAR uses FOO: BAR optionally consumes functionality from FOO using IS_ENABLED BAR implies FOO: BAR optionally consumes functionality from FOO using IS_REACHABLE Now someone adding IS_ENABLED or IS_REACHABLE checks to C code knows exactly what to put in the kconfig. Jason