Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1682144ybz; Thu, 16 Apr 2020 13:35:48 -0700 (PDT) X-Google-Smtp-Source: APiQypJJz98E4ReBmElwGaleO/qjUVqJvaGRAIUdIRvcsotu2ZpOPp9vTbAI/xVfleZ+ZVajOzps X-Received: by 2002:a17:907:4420:: with SMTP id om24mr10671601ejb.99.1587069348057; Thu, 16 Apr 2020 13:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587069348; cv=none; d=google.com; s=arc-20160816; b=x83JyZQSUOZx+69f/q8eeOBmx6IwTR5lU+v2rZ1oVCvYhkJOZgZ3gsxKFTS5qMyYTi 7YfSN5/XQhyXlsYeilB+zC9jgqLQn9PFtJ5AZ6hGGJ8OZGPu216lmIYZchyFgFigpnh7 Tdr7ss5IqWV3+J2tlNTa1yyfuxs8KReFeexbIGMx3W++iN0x/DG/PHL6efzSJ05o9R7r xLF9gu4Qg/H27lhgi3IfzSJe1FkGxVT057sMmXWZnzqls1FvcLUicijofSVHIIDTNTSV +ClxVtYdMu043e4MkT0V1v48VRjbx1EJueelclt138Ai9kW3fqtpQwd+5gqZDFqosWcJ lUYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Uw8pAIuKYjK6ixr6gMRhZkKiAN2Q3ptzOu7Kd5+bnWM=; b=wLZeIvUHpkeOCrDutWrx2fZXEs7nmW/qj8xsiHupda8nXed4rxA2ysIB52NJhL+U2x OyPOgslfxav/jgIC5T+hYKM9Q2Xpg6wZDgVyw4AHvSintPC4aG/cgPkIquhHkKBrR6rC vUfK2GxyXMXi2UyMCFm3BCtKwJp8gUchqnNP9BF/ohMdSnAK+gcU0cQkMoJ3zrbeHp5Q b00IP35ycRNwo115BeEihpyeBjNGhc2EQoSSxU7ThZb6nmcfKUEx8fJpDRvP/c82A4wx JqySNet4pviEzBF24FpATdbB0QlF2q5t3Bx8+npKmcFEGVKV9K1/PE31xiBNhH8hhn/f Z59w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=KunL1GHn; 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 cc19si15367961edb.111.2020.04.16.13.35.25; Thu, 16 Apr 2020 13:35:48 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=KunL1GHn; 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 S2504134AbgDPPSR (ORCPT + 99 others); Thu, 16 Apr 2020 11:18:17 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:42002 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442384AbgDPPSH (ORCPT ); Thu, 16 Apr 2020 11:18:07 -0400 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 20E5497D; Thu, 16 Apr 2020 17:18:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1587050283; bh=kRV0TK76jaLsKumnRx9oBxQ+fB9EZ/hBhcVvcCrUN8Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KunL1GHnZWE+ve/sOLaoFkAzYPKX6+/n+r78iuYJs7x5e+okkGATOqE6ApGMnuikF /2ayUcQFN/Z9UdwuSHJbBCZB/V8aA1w7KUzO09ROtISEFr9rEn/3j6xTfoHtnx7/rk eGxptalaFyRgrldUK2vtce1M8FhIp7rddugLnmJg= Date: Thu, 16 Apr 2020 18:17:51 +0300 From: Laurent Pinchart To: Daniel Vetter Cc: Arnd Bergmann , Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , Masahiro Yamada , Nicolas Pitre , Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , David Airlie , Kieran Bingham , "David S. Miller" , Saeed Mahameed , Leon Romanovsky , dri-devel , Linux-Renesas , Networking , linux-rdma Subject: Re: [RFC 5/6] drm/rcar-du: fix selection of CMM driver Message-ID: <20200416151751.GD4796@pendragon.ideasonboard.com> References: <20200414201739.GJ19819@pendragon.ideasonboard.com> <20200414205158.GM19819@pendragon.ideasonboard.com> <20200415211220.GQ4758@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2020 at 08:51:14AM +0200, Daniel Vetter wrote: > On Wed, Apr 15, 2020 at 11:22 PM Arnd Bergmann wrote: > > On Wed, Apr 15, 2020 at 11:12 PM Laurent Pinchart wrote: > > > On Wed, Apr 15, 2020 at 09:07:14PM +0200, Arnd Bergmann wrote: > > > > On Wed, Apr 15, 2020 at 5:18 PM Arnd Bergmann wrote: > > > > > On Wed, Apr 15, 2020 at 4:13 PM Geert Uytterhoeven wrote: > > > > > > On Wed, Apr 15, 2020 at 3:47 PM Arnd Bergmann wrote: > > > > > > > On Tue, Apr 14, 2020 at 10:52 PM Laurent Pinchart wrote: > > > > > > > > Doesn't "imply" mean it gets selected by default but can be manually > > > > > > > > disabled ? > > > > > > > > > > > > > > That may be what it means now (I still don't understand how it's defined > > > > > > > as of v5.7-rc1), but traditionally it was more like a 'select if all > > > > > > > dependencies are met'. > > > > > > > > > > > > That's still what it is supposed to mean right now ;-) > > > > > > Except that now it should correctly handle the modular case, too. > > > > > > > > > > Then there is a bug. If I run 'make menuconfig' now on a mainline kernel > > > > > and enable CONFIG_DRM_RCAR_DU, I can set > > > > > DRM_RCAR_CMM and DRM_RCAR_LVDS to 'y', 'n' or 'm' regardless > > > > > of whether CONFIG_DRM_RCAR_DU is 'm' or 'y'. The 'implies' > > > > > statement seems to be ignored entirely, except as reverse 'default' > > > > > setting. > > > > > > > > Here is another version that should do what we want and is only > > > > half-ugly. I can send that as a proper patch if it passes my testing > > > > and nobody hates it too much. > > > > > > This may be a stupid question, but doesn't this really call for fixing > > > Kconfig ? This seems to be such a common pattern that requiring > > > constructs similar to the ones below will be a never-ending chase of > > > offenders. > > > > Maybe, I suppose the hardest part here would be to come up with > > an appropriate name for the keyword ;-) > > > > Any suggestions? Would it make sense to fix the imply semantics ? Or are they use cases for the current behaviour of imply ? "recommend" could be another keyword. I think we should try to limit the number of keywords though, as it would otherwise become quite messy. > > This specific issue is fairly rare though, in most cases the dependencies > > are in the right order so a Kconfig symbol 'depends on' a second one > > when the corresponding loadable module uses symbols from that second > > module. The problem here is that the two are mixed up. > > > > The much more common problem is the one where one needs to > > wrong > > > > config FOO > > depends on BAR || !BAR > > > > To ensure the dependency is either met or BAR is disabled, but > > not FOO=y with BAR=m. If you have any suggestions for a keyword > > for that thing, we can clean up hundreds of such instances. > > Some ideas: > > config FOO > can use BAR > maybe BAR > optional BAR Another idea, depends optionally on BAR > We should probably double-check that this is only ever used for when > both FOO and BAR are tri-state, since without that it doesn't make > much sense. -- Regards, Laurent Pinchart