Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1061041ybb; Wed, 8 Apr 2020 15:43:26 -0700 (PDT) X-Google-Smtp-Source: APiQypKpXQGDCePypLLF7nShlyTJ2XgLNOsj4f6o6z0z4C0HmIJtIPr8fde0XlofobLK0Y59lHtF X-Received: by 2002:a9d:6a02:: with SMTP id g2mr7816305otn.196.1586385806660; Wed, 08 Apr 2020 15:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586385806; cv=none; d=google.com; s=arc-20160816; b=EdiC9b8wXZq4avd8nQtX9Kmwxh8Gpc4WuTely1lYNpTzGSb+6UBLG4xLOnvMjKI0ms 5sLfKBVcu8gMqBIdtlvIMpw2gh4iV4VARRAXOFNkzWGqHIX8VW9ZYi3tbwX5ODjPbt72 i86qf/+UZY48ljLJfP4Q4WBz/Na0ylYCC8e0tblcCyxG6qUNrjtgeRtYisSrzE+/itek STHz85efYVv7+HcpmDUiC69TweXsfOlcWi6/9osTrhnSY6SY46eWWu4XQ6EUoUGzMsWb hP/AaDFok1kZvokTQOUBkc7t0M1evArJ0w6gJoCKEppVq+MtiEA4m/p/9SncUPkXJvyv VDAw== 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=Gx7CIn2jLm5j4xdRTQllP3gtsV1GD1rqAZK1dgPXufs=; b=ewflsMvVrd2MfZlAVpKnX4CrdOqPPqPJfq1YUyNzOT7iSbSzwod+C4zNPO3u7WmLzl V3TdbubO5Bkj0GQ6SerEjEEfbF4pPbAugu2yT7bkXwg1GNgoHR+j/d61EdvspDS9clKN qi/1YfczRUbHg1w8/kUKE7nYk7IYfNSo59+gvJdqXmiB6+Jtppxxg/oV0hld+91xFsrZ s6JADXpN+iE4Wp0lX8AswL/c6O6RXqG6Co+/IgCcFfZN6bzr9q+ivOtu6KCQBglzDXhC 9vz+J3uYptpXO+JsF9CkgOiVwKMYQUZmXO0/YngLotTzg+SCC18v1ElpSG8sb/JznPc8 2bpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=QNvwhanR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r67si2621265oib.237.2020.04.08.15.43.12; Wed, 08 Apr 2020 15:43:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=QNvwhanR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726545AbgDHWm1 (ORCPT + 99 others); Wed, 8 Apr 2020 18:42:27 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:36500 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbgDHWm0 (ORCPT ); Wed, 8 Apr 2020 18:42:26 -0400 Received: by mail-qk1-f194.google.com with SMTP id l25so2125277qkk.3 for ; Wed, 08 Apr 2020 15:42:26 -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=Gx7CIn2jLm5j4xdRTQllP3gtsV1GD1rqAZK1dgPXufs=; b=QNvwhanRxS4Sp2j2LHSLQcsnvtI8nKLKCO4iJmFGW1B92LmBwTjRXgMu6hoA+3nu6a +AncNDjcl0kSubqIIKDmhQ/B4P0DWLjY944vQvPzXqfIZ/sCSq0fDEsgem3Gc5iICbyv 0Y39n5KQM6xKjbVgPorJhsaiN2AuYU7Q0/dWwDhxN1r5mtViSRqRNidGJ/zth/jmXnAd Fj7J66gfSRWdqqRboP1FK189wHiA2ZAzhPdo2Mp8SJP9vg7U1rEBSGTCCasAVssBxBTy zYpfsDYyG5+n/7srZdc6jeXEQR+u64TxJV40NMVebs8Xh6UEw6KOAP5b0PcZX96oRtnX 4fIA== 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=Gx7CIn2jLm5j4xdRTQllP3gtsV1GD1rqAZK1dgPXufs=; b=oINQfnwCtansffd7n4cRrPntuKRqiJXayrvDqggLgkevHC7ikBl+30Cga2I+Gi7gsU toDVHnJjvhxEzC/gt8HXr/7jiqjRZDBSrZt3fDXWxcRf5MHOnAktZ+TqJVH+V8wC8PNX kyGouWYgnMfDe/G6QRw3Cxido3tg08n7ymI44nXYqB10Zu0HbX9zt2ztWGZ5Q6D1Cm/t I59Deilj+oNdGoF+S8Al4ecnNbBvvFI6mJNkSU+ZXjqwBji9NvzNewFW4PeB69mJyNDs JVqJCuH7laBH+TufYRMc4I1hJ2VKTHrX6WXf7gmg8rAHdpM3k/B1s5rA89+IJrQGcupa /hXw== X-Gm-Message-State: AGi0PubSImH9L6eVnLhenCPVCNx4eZtEPDq/gduHmADBOsOZPrfn6zAp qWDb7nvGrqL7hcxpnGrut+o46Q== X-Received: by 2002:a05:620a:4f2:: with SMTP id b18mr9768314qkh.433.1586385745928; Wed, 08 Apr 2020 15:42:25 -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 x17sm19797204qkb.87.2020.04.08.15.42.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 15:42:25 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jMJOq-0006Fv-Ln; Wed, 08 Apr 2020 19:42:24 -0300 Date: Wed, 8 Apr 2020 19:42:24 -0300 From: Jason Gunthorpe To: Arnd Bergmann Cc: Nicolas Pitre , "linux-kernel@vger.kernel.org" , Masahiro Yamada , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Kieran Bingham , "David S. Miller" , Saeed Mahameed , Leon Romanovsky , dri-devel , Linux-Renesas , Networking , linux-rdma Subject: Re: [RFC 0/6] Regressions for "imply" behavior change Message-ID: <20200408224224.GD11886@ziepe.ca> References: <20200408202711.1198966-1-arnd@arndb.de> 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 Wed, Apr 08, 2020 at 10:49:48PM +0200, Arnd Bergmann wrote: > On Wed, Apr 8, 2020 at 10:38 PM Nicolas Pitre wrote: > > On Wed, 8 Apr 2020, Arnd Bergmann wrote: > > > I have created workarounds for the Kconfig files, which now stop using > > > imply and do something else in each case. I don't know whether there was > > > a bug in the kconfig changes that has led to allowing configurations that > > > were not meant to be legal even with the new semantics, or if the Kconfig > > > files have simply become incorrect now and the tool works as expected. > > > > In most cases it is the code that has to be fixed. It typically does: > > > > if (IS_ENABLED(CONFIG_FOO)) > > foo_init(); > > > > Where it should rather do: > > > > if (IS_REACHABLE(CONFIG_FOO)) > > foo_init(); > > > > A couple of such patches have been produced and queued in their > > respective trees already. > > I try to use IS_REACHABLE() only as a last resort, as it tends to > confuse users when a subsystem is built as a module and already > loaded but something relying on that subsystem does not use it. > > In the six patches I made, I had to use IS_REACHABLE() once, > for the others I tended to use a Kconfig dependency like > > 'depends on FOO || FOO=n' It is unfortunate kconfig doesn't have a language feature for this idiom, as the above is confounding without a lot of kconfig knowledge > I did come up with the IS_REACHABLE() macro originally, but that > doesn't mean I think it's a good idea to use it liberally ;-) It would be nice to have some uniform policy here I also don't like the IS_REACHABLE solution, it makes this more complicated, not less.. Jason