Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp783069ybz; Wed, 15 Apr 2020 18:59:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKDQlnV+8C9mMWY/WDjh03lSYGKobyATs48zuuqbu8A5h64Jc5qLXftdCY6YBRjFUQS/FKv X-Received: by 2002:a17:906:85c2:: with SMTP id i2mr7753682ejy.147.1587002357339; Wed, 15 Apr 2020 18:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587002357; cv=none; d=google.com; s=arc-20160816; b=jyEhNzmnqhEwuhr9r6vaUl98vlgtFzCn6Bxd4HUshz7+M2t0p5APGOCAzZV8ZYo9D/ c5QI+k97bdREC7AkatQuZT3qvFFk7Jhy6gkPqsLZTwmoAdoagFURA+ESFG3AAUsGbqxc 9Lou8OYgVM3cZkKXsaee3/r+IP2jK3esjbMXp7HDV8geyDNhFZ2KOF+PnmfByWIKhBBS dBB5hfTgUD4lVAHnv0s1N6jQwf0LJMarRWHLkD3utm9CLoE6H1F9c+qfOShXr6p8jSXA AABRbyfzI7nZ+AqUPsH5SrV8hfzN98KW3iENWSnCELmh6DI0KsznVdkO7eLjaCprZ5SL ncLg== 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; bh=CvULim2QV9soj+KMkRoo+j4iKG7hQ1V1OFo2h8pIvVE=; b=MsfyEvNw56P9tx95mNWy4X1sq0u895VZooIdVh5zDJAzwdjS0WWkUVFm9FFGrhA9k2 cuAvzeQNIMawc84DvBVpZmrOw/XdkSkGMrAqwm2Kf3b70ievtYl6DiT4q5Vsljl19wBy G4XobObEHc6WbRpTWNRYa1tXRGtst0hDNcFrJpdXcR0jMFH99V1sUed+I79HdKTuO1RQ a9f2oUJspD9Hi43PkX/06hAEfMbkEVnm2yQ7PBxE/zzS3919elzSAxzr0IXeStNUyh7F M7JlvjCy9nMOUEpyyp+gcLP2x2qBqWfMDsmsYHY8qqHeZLTWQNraGMOmqympzxz6gFXH MSAw== ARC-Authentication-Results: i=1; mx.google.com; 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 e8si12528197edl.2.2020.04.15.18.58.54; Wed, 15 Apr 2020 18:59:17 -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; 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 S2439023AbgDOVWh (ORCPT + 99 others); Wed, 15 Apr 2020 17:22:37 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:36329 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438888AbgDOVWa (ORCPT ); Wed, 15 Apr 2020 17:22:30 -0400 Received: from mail-qt1-f177.google.com ([209.85.160.177]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1N1Oft-1jHQcr3hHv-012qsn; Wed, 15 Apr 2020 23:22:27 +0200 Received: by mail-qt1-f177.google.com with SMTP id f13so14596167qti.5; Wed, 15 Apr 2020 14:22:26 -0700 (PDT) X-Gm-Message-State: AGi0PuZ/kP3WUi2Zz6ULx+o2pAu96VKtRUBR8fUCGcJY7ystCJZsMkRw zrxJ/j/RyhHK86Nl0vfliQkJrBXBrW0FVZE0QIg= X-Received: by 2002:ac8:6757:: with SMTP id n23mr10344447qtp.304.1586985745338; Wed, 15 Apr 2020 14:22: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: <20200415211220.GQ4758@pendragon.ideasonboard.com> From: Arnd Bergmann Date: Wed, 15 Apr 2020 23:22:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 5/6] drm/rcar-du: fix selection of CMM driver To: Laurent Pinchart Cc: Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , Masahiro Yamada , Nicolas Pitre , Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Kieran Bingham , "David S. Miller" , Saeed Mahameed , Leon Romanovsky , dri-devel , Linux-Renesas , Networking , linux-rdma Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Hl+rud1vypg7WIK8rDk9bs6uEnKqs/OlTWu3wzR5saWRjBD2o1i sL9990cHNVajheAgk5GS3bAYMQUtGpvsvpjtOzaElo36GexxoCKsxoZeKWIVzFmAhQUCtWH lUMDSZh8/C5w7dTadNUhv4YFRrIsngQEXk4iG6am1FbeMtT7/JNWXNTCzMQRJ69ZkORLyh9 ntoyAIuVbcm+InOBYwqFQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qOHnPyy+am0=:uITFvpA/Fajo3jltuWYdlR GaZr+ZFb1wAIjLmDNChn3eRBDUUyw3bYQjjMM0a+H6bWI6gobydrADxfR1wMfEZsx56vkqcV9 v6VqiF/LJdqtVfxs4dullK+MquZ9JjSGa7HNzpoGZ2Ls1VwPZdvTOThRpuJcX2EI4c02LFRTJ +T906lbY7T151zn3rUEwnkMZpFpc5HcE3DuClNb82b3yY3bSuaEYoAODAsyuGDiZh6aRxPwwI RXeuoSqQITjA/YEthYZVnfc6wOKPOY/tAoUsjNuxjte6QqTJF7UoPtTKnHK/f37T9FPqa+owN Xh5u/6sn6A4EN4ZGQ7ODxa+WRaDbqnVjtRiX8vlqtDqIPs7bCYltuFtOB+oAvwMyYGAENMwem C//9cwWQvOSuUJEjt7o6noKtcn0fBQsHZ8W7vaqPgS2pToyFSUoC4V9A1cIieKxb6ZOIcP97i PxR1Ock7v6EEetygPWimJAPhEUI7qGcpDb9FW9LVpFIE6WcBG8EH89mUJwwUhf7hNA9PVjSWo NpU02HU0u+yHyHIRFfgijTEvi1FNZgk1BcHE/vA0ZgNnuvRvWHeMXcBYK1iGEfbYvs322+ApI /CqNjVekqJuozSqmFlETgm7YeWa4mMIa4RLVNoDmG0MX0BGVyqZdh5u5X9pT4bqiONlPT4opr rjJdgb7QDas1d1Srz9yW49g9w+IlTqwj0MnR2kQgItr740zsUoHvj7g4JII+3cn/Fq0Xb3NT7 suepIOWTjOcWbOTpnUN6hEhI6COhr8TXYhYKlY34hqdH7ocHCRHCBskSA0yOleXmlEPsEpZ6m 3j4Iyc/qhvz9nt9djkgQqgZYWejrCE2nvcUix0tZcSnWfFGVwE= 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: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. Arnd