Received: by 10.223.185.116 with SMTP id b49csp524896wrg; Sat, 3 Mar 2018 01:38:42 -0800 (PST) X-Google-Smtp-Source: AG47ELuxrvXwZN/ZHSqoDwzEmmAWJ23aoRWuQwUnaQGi2c8i2+AO/HQ2wzWHgpXEZ7e6GZX0OlN7 X-Received: by 10.99.191.78 with SMTP id i14mr6561840pgo.95.1520069922470; Sat, 03 Mar 2018 01:38:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520069922; cv=none; d=google.com; s=arc-20160816; b=wsL9x3vdXKTd4Mh7Q0kSYdbalTVSGJ+TwWNSW/IoQlwZ5X51kZ6VVXz+cDfcivgngQ td6lNA03w60jmxK8Emlgb7SeccdhHkN0VzGi9q2oCEqu0JHaDuOP8nRTWafd2FTUU79H JjXiRZR++G7W0IPWUwlYQp94Lz0rF1wPkYi+2t1QBXKq+jfi/j5vmwAYSBX4PpRw76hz 4teFamzaWL7V3mg7L2aiudC0t+kD/fnNlvDVe7/DS9kKkY+JYPGM6RwREZXjdJt6lC70 hDZTepedhGcSfiaLvFHeVWfucjOi7beI00YcN1IL5JjB2FT9/CKfACkT9UZke87L087c VYRw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=hhVa8c2M4yF/biRenDsDtkc3UA/zFikBGW6rFhlEozA=; b=DD3ONis3KM7Q2hYknplN1PBmyISqPVbN1PE+DxA2OnneZqPaOml5q2UkUfwDj/GZg5 BzseISBsDrPZpR9Ryu4hWOqA98Z6++wlNtcF7ouD2fmfHP78Tt2rM/p72jfczVsjm9U1 0ZbTNDdvUb7EwpSCO6D8xJcYaI7J3pc5jmTjXHS9Zj2enRIjG92TRypUAmD8AFjW47ql t0MaxL2i0UCVumBttVUG7dDu6Kot63IfsIO/XsrKUE2AYF7VyPclePpdPsTCmgOr56lf bGGfu7SYZqFn2kso248yAg4ATl0ywpwPPfmWwPI73iTfHF2WFp1FY0uARp1txqxFh0n+ dNYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=epXWADca; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k186si5280475pgc.15.2018.03.03.01.38.13; Sat, 03 Mar 2018 01:38:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=epXWADca; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752016AbeCCJe4 (ORCPT + 99 others); Sat, 3 Mar 2018 04:34:56 -0500 Received: from mail-ua0-f170.google.com ([209.85.217.170]:37497 "EHLO mail-ua0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894AbeCCJey (ORCPT ); Sat, 3 Mar 2018 04:34:54 -0500 Received: by mail-ua0-f170.google.com with SMTP id q8so7545497uae.4; Sat, 03 Mar 2018 01:34:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hhVa8c2M4yF/biRenDsDtkc3UA/zFikBGW6rFhlEozA=; b=epXWADcal4dR6vEuMrKsrXosDFEAh1akKETI1HmqbjoBllftj2sBnpe5p3mIfNE6ze ArKudAoXLl0Z74uhcgLUHAh7LkjWJizAZkxgHBF3ddZEYblJfwcaYriix58i7Qf9fvUa JcVh4dGdkfMmeLG8RqXy2UZD8KGNXv4pzAOssZwzmQap2q0LAWYPYqD1pdElqWleoKdO MPot8mhhPfrJx0zPBtl0fqGkhaIBxYwDNdWhW1fegUN1zRybDrrTlg8LA684vrLg+tW2 1QGb1bYlLqrGjF0ItkdJKNrNCrKGU9vKFHhXMHCQHEyce01voSrJ5+ZpTmhMNsoDHD7G lNGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hhVa8c2M4yF/biRenDsDtkc3UA/zFikBGW6rFhlEozA=; b=o9e1kE/O4wXohaN3fTZo1QuKK1k0l6gdf3Bcut+Qv+/yWOaOMx25WWP5R/SvjZwT36 38lCS44Z89zB1mx8pii2afL6wN8KTtdFJ3TKKx1YFGvqE0wHE1C2X9gELOwwrXGR9XDV 5UiFT2BrNT59He/MAHFeIwilToOyDMHsq8+PU8OPZOgUgFGZGrnPfv/23qUmdl5Fr4S0 Y2JFogBwwaCPm0c+LTkmW98+f2DQxuc8tTuPcEyIrG/SMALEjJhsq2prmTaeoFXesKFx QkuorS7+cUcMb6XjwP4PKLzcbHvO/3SaVDGDp6Uwbec7hduwtRIKJwrxFViSUP7rvwxq YVng== X-Gm-Message-State: APf1xPBuqnA+naRlxlADKAQv0lWZQEq3rLhccU3IrLcykNYOhKJ1AdFp N5Vz6QGy8SiFvW2NHyjdGGtf6IxtP5P0HfOF9Jw/xA== X-Received: by 10.176.75.163 with SMTP id v35mr5737748uaf.143.1520069693853; Sat, 03 Mar 2018 01:34:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.220.145 with HTTP; Sat, 3 Mar 2018 01:34:53 -0800 (PST) In-Reply-To: References: <1519965121-12017-1-git-send-email-yamada.masahiro@socionext.com> <1519965121-12017-10-git-send-email-yamada.masahiro@socionext.com> From: Ulf Magnusson Date: Sat, 3 Mar 2018 10:34:53 +0100 Message-ID: Subject: Re: [PATCH v2 09/11] kconfig: unittest: test randconfig for choice in choice To: "Luis R. Rodriguez" Cc: Masahiro Yamada , Linux Kbuild mailing list , Sam Ravnborg , Michal Marek , Randy Dunlap , Linux Kernel Mailing List 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 Fri, Mar 2, 2018 at 10:29 PM, Luis R. Rodriguez wrote: > > > On Fri, Mar 2, 2018, 3:14 AM Ulf Magnusson wrote: >> >> On Fri, Mar 2, 2018 at 5:31 AM, Masahiro Yamada >> > This is complicated usage, but it is still used in the real world; >> > drivers/usb/gadget/legacy/Kconfig is source'd in a choice context, >> > then creates a sub-choice in it. >> >> That file is the only one that does all that weird choice stuff btw. >> >> It's as if it was written to make use of as much obscure Kconfig stuff >> as possible. :P > > > Can't we just use another way to describe this requirement on this file, > with the trade-off of simplifying kconfig semantics? > > Luis I don't think changing how drivers/usb/gadget/legacy/Kconfig does things would allow for any simplifications, unfortunately (except to get rid of the fix tested by this patch, maybe). Being able to have non-choice-value symbols and choices in choices is a side effect of automatic submenu creation. Symbols and choices that depend on the symbol before them end up in a submenu, and only the top-level symbols in the choice are marked as choice value symbols. I always wondered whether that was an intended feature or just something people discovered works (it seems to work anyway...). It feels pretty iffy to have cosmetic submenus affect behavior like that, but playing devil's advocate, it kinda makes sense to put symbols close to the symbols they depend on if you can get away with it. Cheers, Ulf