Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp975062ybz; Wed, 15 Apr 2020 23:54:12 -0700 (PDT) X-Google-Smtp-Source: APiQypLGLi6k1ruFhjtdFHUsJy0go02P8dUUNu2pqeQpe9Q4AuW4+p2JFH2NxLt0slMFU6dnryV2 X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr8465195ejr.351.1587020052188; Wed, 15 Apr 2020 23:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587020052; cv=none; d=google.com; s=arc-20160816; b=vEDkXKxn9+rK9VydH99+qjFzH+LE7EOhuhCZk9o4P2uTKZrocolmo03fBP7MZsM/JG HumgDGXANh4KcRuel1I3a5BMgH1liTz5u/bAXPACSSedXGtGMQ14YCmrwjvHeNDwEAJ/ E5LpWEUP8nOIjsLpxEC5rY0tqU6AQF3UO0gDOnzd1G0M8plUIQvxSult6VcQXkVeMQAh mE9sElfMQ7S7M7zvI2TE91xSw0tEhnVYHgBsUWSyMQaq2EaICWTVQhIQ/yqepqZHdHzl W84W5HOjnda+lfDoeKdqb3gzUlKuC5GGwgLeP1/mZwP4GJgiMT8urROvrcrKTn5C0cR0 ApJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pLZEHboHrVUvSiMzAU5mB2mWJMs+hZ8IHC8retFcrgk=; b=pvfXvEUXey5ZcM4GfXQRlcWPtesw+KtR33Kb7vGY6XADEnPMRbVCYheWOVkicf4Sea V4lG1YiccfRVIF2RWwsURXRwTcXGQBUyFEl4gc1oEIxjiVAfJ/mR+x3Ra1FeoFBbEjnY 8TV5+SXpSG0PzosnF6MUAIQXbtFSPH5hQpVbaFnPmxkPChxZvJDMps7bfeqecMk+970E n34K7C8Wh44A8bDCGc45Bu4QLsrdn16X8N9qStP686QmjoHg2ZT1T6WKuumCfHNmE83H 2K9Tlw6WiOQ7pubWVFPJzIFVSO46XYsMSPhTihlgL0HxF8bL+QubUGG9oK4QIBpqAZ2z Ji8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=JHwymh36; 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 w11si12223879edf.135.2020.04.15.23.53.49; Wed, 15 Apr 2020 23:54: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=@ffwll.ch header.s=google header.b=JHwymh36; 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 S2436801AbgDPGvb (ORCPT + 99 others); Thu, 16 Apr 2020 02:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2408589AbgDPGv1 (ORCPT ); Thu, 16 Apr 2020 02:51:27 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 559CBC061A41 for ; Wed, 15 Apr 2020 23:51:26 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id k133so15052920oih.12 for ; Wed, 15 Apr 2020 23:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pLZEHboHrVUvSiMzAU5mB2mWJMs+hZ8IHC8retFcrgk=; b=JHwymh36ehjFDNDrb8YuMyQ1MkWFaqFQka5rlpHvpOpNowJkEQBJjUJHh6tEn9ItJf 44VDASM1Nm9+28OJ0BhPDfmpGS7h0JIyE4ei3cCTN1kvXMsSEqE7hJ6ugWHQLwwsjP4k SXfyV81W2EeHu0cLCfENisqsTzpcXqPmUQBbg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pLZEHboHrVUvSiMzAU5mB2mWJMs+hZ8IHC8retFcrgk=; b=Hg4cPzUrPp+2WkRwNPg2d6iQLpcU6eL5ZOuT65T20Up0zNtO9jct+HY/QFTxlJ+xtD ISv1LAVtBvMJesAKwR38Jf+tJ5SHHRf4fq5LNaOpnYlCRQ8E+GUJ0nVW49Q44bF4yDRl 6K6LePQSSc4wRuJ8yP1FWgBlvYPQnnNLDzHdl/XzK2BtHjtG92qmxqDfuFbeJLBlpRFM KfrLtpnZ+T3/u93f5ZJRjs8g44z34YdOQusMdN/OPLu+7FbMgVlTfclFTBU/v1kM6Ucc Qx1ZvzbLt8TZ/JUts6iFoP8pGWTrT6EqO18pD9Lwm+sXzyPGT56udVimpudtMphBKvXi sagA== X-Gm-Message-State: AGi0Pua3563HXtJH08iG0uWioGpRGo46Tmd3ezFzhHdr6zagJoC/22d5 IGqlsECabQZyyK/Zj7IJu3aHTsll/GgK200YAk7Y2w== X-Received: by 2002:aca:2113:: with SMTP id 19mr2018002oiz.128.1587019885629; Wed, 15 Apr 2020 23:51:25 -0700 (PDT) MIME-Version: 1.0 References: <20200408202711.1198966-1-arnd@arndb.de> <20200408202711.1198966-6-arnd@arndb.de> <20200414201739.GJ19819@pendragon.ideasonboard.com> <20200414205158.GM19819@pendragon.ideasonboard.com> <20200415211220.GQ4758@pendragon.ideasonboard.com> In-Reply-To: From: Daniel Vetter Date: Thu, 16 Apr 2020 08:51:14 +0200 Message-ID: Subject: Re: [RFC 5/6] drm/rcar-du: fix selection of CMM driver To: Arnd Bergmann Cc: Laurent Pinchart , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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 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. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch