Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3912096ybz; Mon, 20 Apr 2020 11:43:39 -0700 (PDT) X-Google-Smtp-Source: APiQypK3X2XsjDN8x+DiyvVrj/f7Vm5bZ6eA1ZQOaQrN2DHH9U8/MIbIzOJ7EAZiM8zX4+fBOt/u X-Received: by 2002:a50:a7a6:: with SMTP id i35mr15237745edc.130.1587408219684; Mon, 20 Apr 2020 11:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587408219; cv=none; d=google.com; s=arc-20160816; b=1D6dJ0oM5PksiVJflyXTzNFTEwVaT+zHxM0rBZKY1s1Qq56B5ygNjj5kP1m1iLqcdL azELPcdiVjGqSDLQ3p5f4BghMcrg4J5H01OmXBq2xa0nsI/Y1rpXBXg3CwYwxR8kRs21 C8X4E+pSg+U7uwWFhUU9Do6booDAK2kU+ulxUqAKhnf7d3EDyFVYgFezmiZ3NFrpeGFz Vin4OnRz0dE58L12yh3SURUOKudkSHt6CQ30j01AoPnd5Kf6DSLig/cShD0g0DaApQUv vyn3CEJWps5CrNj6bHsm3X0OZrY5kJgQ+TgOPpj5hmeblFT4uhbES4Sr9o1Q/Dce9Ren +aAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=AwJAY+DN5VxMCCMOYSkI5BQoYov+n+grQJiC00okJu8=; b=lmMVCbXZkXyjgxkNwwGyND0ukiacDq2YJILCY6nV2wfXApt44eONZdBcFugPUdyko6 q8v82iZuMUhfYbRqlIvVeqbAht7rWcgc6nhkfFvFEdruIQwAET4oYary3/kpeAaI8aAR QYK8wXrl2EdNx67rjUgp4gxvEG6dHr0gnLwq1bsudiy3pDjzy3Nrej/ixkpWJVt52oFZ dXY6wYSJh5x1AwTdvManmMvzkMvAyLBil0mckzrSOQALfRoSTkAA2aOEr2bVeFxasM2U FyJNGdCGzM4IfN/qWa+4mgNbVpirr6VVucAvBuOVbHlgWvATioW0qEpKQMO4BCgJoI6+ 85Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JsAB6+t1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si135943edl.365.2020.04.20.11.43.15; Mon, 20 Apr 2020 11:43:39 -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=@kernel.org header.s=default header.b=JsAB6+t1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgDTSmV (ORCPT + 99 others); Mon, 20 Apr 2020 14:42:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbgDTSmU (ORCPT ); Mon, 20 Apr 2020 14:42:20 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F4802074F; Mon, 20 Apr 2020 18:42:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587408140; bh=J1Pz4saX9jEjbkW/1+ZB7lzOWI+VGAU8j2Mv8AfiHU4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JsAB6+t1dHV6pvoNwy2P8v+KHnBGozzcYEBAsOqCqaQK7HENSdA/Epo8cuYKfdaeH UQmrYop56C28Q6adcFqTx4BaxJjZ9m7iZ1VJO4KIbv7oJr7VzX8Xfj1938D62gu5ay CxfzWhjJbvIpNgzF6SClWGl8oh09kyNCstcquWOI= Date: Mon, 20 Apr 2020 11:42:18 -0700 From: Jakub Kicinski To: Jani Nikula Cc: Masahiro Yamada , Nicolas Pitre , Saeed Mahameed , Linux Kbuild mailing list , Arnd Bergmann , Jason Gunthorpe , 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: <20200420114218.30b373d4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <87v9lu1ra6.fsf@intel.com> References: <20200417011146.83973-1-saeedm@mellanox.com> <87v9lu1ra6.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Apr 2020 11:43:13 +0300 Jani Nikula wrote: > On Sun, 19 Apr 2020, Masahiro Yamada wrote: > > On Sun, Apr 19, 2020 at 4:11 AM Nicolas Pitre wrote: > >> > >> On Sun, 19 Apr 2020, Masahiro Yamada wrote: > >> > >> > (FOO || !FOO) is difficult to understand, but > >> > the behavior of "uses FOO" is as difficult to grasp. > >> > >> Can't this be expressed as the following instead: > >> > >> depends on FOO if FOO > >> > >> That would be a little clearer. > >> > >> > >> Nicolas > > > > 'depends on' does not take the 'if ' > > > > 'depends on A if B' is the syntax sugar of > > 'depends on (A || !B), right ? > > > > I do not know how clearer it would make things. > > > > depends on (m || FOO != m) > > is another equivalent, but we are always > > talking about a matter of expression. > > > > > > How important is it to stick to > > depends on (FOO || !FOO) > > or its equivalents? > > > > > > If a driver wants to use the feature FOO > > in most usecases, 'depends on FOO' is sensible. > > > > If FOO is just optional, you can get rid of the dependency, > > and IS_REACHABLE() will do logically correct things. > > If by logically correct you mean the kernel builds, you're > right. However the proliferation of IS_REACHABLE() is making the kernel > config *harder* to understand. User enables FOO=m and expects BAR to use > it, however if BAR=y it silently gets ignored. I have and I will oppose > adding IS_REACHABLE() usage to i915 because it's just silently accepting > configurations that should be flagged and forbidden at kconfig stage. +1 I wholeheartedly agree. In case of Ethernet drivers having higher layers of the stack not able to communicate with drivers is just broken IMHO.