Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18087315ybl; Thu, 2 Jan 2020 18:13:00 -0800 (PST) X-Google-Smtp-Source: APXvYqwKG5Qgaaka1MY9bvrGUmEgN+B7HU2sTNRpFI/P3PKWR029Vqz/DzlgEvOvkRmNBIy4VW7O X-Received: by 2002:a9d:24e8:: with SMTP id z95mr96973256ota.5.1578017580405; Thu, 02 Jan 2020 18:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578017580; cv=none; d=google.com; s=arc-20160816; b=F3Tp9ZjDXTVQScLeUTYnhGx5haWdkjzUnJzhy/zEAMW4RO/ODRPM6gvfhCftW4h8GE OfAqdzp48pq+1tQRJV+KdmjU38Hn6CCKFMvRDm1uQStS0JiX1G54zRuVzxIgcbGVPvaZ k05wy63ZETUz01MSj1i9preB1B7ZgWWYoA9G0thfbspvptQ7j+FBMBphXZZ1oGgrkI6r 6qRXOy6fP3ICRePPhihvDu+L64C8fXsmEDIPsG2qQtvwwXmp8AKv7pyUTpdp5v2n2hwJ RjiJzXdgmAk4VAFm+3M2F2IGLQ/pFSyjZhCDOXibZ5E6O5b67zk3kvriro507f2unQik +prQ== 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:dkim-filter; bh=upu24NLE1snKcWgRNKQYCdPnQQGwl7WkIqIrlHt44Eo=; b=SdmTQswzIEihkEKPgvaauDgixf+0CkiSrwPuNxb7PJN2f1iqmsZau5M39XXVBkIA8X E0RjKx/TNkEhlP00L3NeY3I3riWk0kP5bGzd4I53pxghRJ+jakm6C1Km/BLX8muuS0q0 ngVdGqPpVhtp/bTezDutvH7/foVyU3wYVHxmwdaRbSYP+egdppV6JB7d5h4DmzNMOjAw 2STFzHOiNygjf53VTMYvDAyd7pfvlyMuTHXKZ/yirRSfBA4LdNfxZX1z1DGAqiXD5PaM t3lIQ/MDucvCrc7WudRoAybnXfBnf93bCV8Eyp33RDlwXLrNIF4Pw3iTNuIEyIijYOlH nrnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=xvepVGvn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si26925406otk.221.2020.01.02.18.12.36; Thu, 02 Jan 2020 18:13:00 -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=@nifty.com header.s=dec2015msa header.b=xvepVGvn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727290AbgACCLX (ORCPT + 99 others); Thu, 2 Jan 2020 21:11:23 -0500 Received: from conssluserg-05.nifty.com ([210.131.2.90]:35986 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbgACCLX (ORCPT ); Thu, 2 Jan 2020 21:11:23 -0500 Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 0032B5Qu012901; Fri, 3 Jan 2020 11:11:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 0032B5Qu012901 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1578017466; bh=upu24NLE1snKcWgRNKQYCdPnQQGwl7WkIqIrlHt44Eo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=xvepVGvn3EkNyg3i+MPWM3c0zBKeSLQY9QKYjEQ193fg1bjip52IcR0FA53DQkIFR GH+yzeFncw/NjlPj4B7sftoYfFbwXraETOBeG2Pbxb75l6wAjYWLm7O2nquIbcMQPB +m8THHLIykWhsV6qEvAYpnBvCFR6fr9/3RYH6W0d9d9Z+TYS3g6uqJlidUuK/9Gom8 3PobKeufJ0CFnBwXK1srZ/BlB2aYW0C84TE9no4EYO/L1kfNFBqYXuPpYEPXg09v+R gaeAhv6tmVLZJbYSQ0dLsQa51wewlMoCr2DTNnPYTECv7mdajCU4taXHG2nhSJRr4/ DL88I/FYmSIEQ== X-Nifty-SrcIP: [209.85.217.44] Received: by mail-vs1-f44.google.com with SMTP id b79so26536439vsd.9; Thu, 02 Jan 2020 18:11:06 -0800 (PST) X-Gm-Message-State: APjAAAWj8GNtQqUxV/j3olNMFZzOQpcEWzgpX5B0AAtv1ZZj8nenwsF2 H5vHpogZysjTFpp6wLHoTFGzCEsv878gkKQziNs= X-Received: by 2002:a67:f8ca:: with SMTP id c10mr37710313vsp.54.1578017464841; Thu, 02 Jan 2020 18:11:04 -0800 (PST) MIME-Version: 1.0 References: <0ea3e528-4835-ff9c-f5a2-f711666ba75f@infradead.org> <20200102231402.1052657-1-nivedita@alum.mit.edu> In-Reply-To: <20200102231402.1052657-1-nivedita@alum.mit.edu> From: Masahiro Yamada Date: Fri, 3 Jan 2020 11:10:28 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: restore prompt dependencies in help text To: Arvind Sankar Cc: Linux Kbuild mailing list , Al Viro , Rob Landley , 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, Jan 3, 2020 at 8:14 AM Arvind Sankar wrote: > > Commit bcdedcc1afd6 ("menuconfig: print more info for symbol without > prompts") moved some code from get_prompt_str to get_symbol_str so that > dependency information for symbols without prompts could be shown. > > This code would be better copied rather than moved, as the change had > the side-effect of not showing any extra dependencies that the prompt > might have over the symbol. > > Put back a copy of the dependency printing code in get_prompt_str. > > The following is an example for NAMESPACES: > > Before: > Symbol: NAMESPACES [=y] > Type : bool > Prompt: Namespaces support > Location: > (2) -> General setup > Defined at init/Kconfig:1064 > Depends on: MULTIUSER [=y] > > After: > Symbol: NAMESPACES [=y] > Type : bool > Prompt: Namespaces support > Editable if: MULTIUSER [=y] && EXPERT [=y] > Location: > (2) -> General setup > Defined at init/Kconfig:1064 > Depends on: MULTIUSER [=y] > > Fixes: bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts") > Signed-off-by: Arvind Sankar > --- I had already applied the following patch; https://patchwork.kernel.org/patch/11298143/ It it available in linux-next. > scripts/kconfig/menu.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c > index d9d16469859a..6fbbe41302dc 100644 > --- a/scripts/kconfig/menu.c > +++ b/scripts/kconfig/menu.c > @@ -706,6 +706,12 @@ static void get_prompt_str(struct gstr *r, struct property *prop, > struct jump_key *jump = NULL; > > str_printf(r, "Prompt: %s\n", prop->text); > + if (!expr_is_yes(prop->visible.expr)) { > + str_append(r, " Editable if: "); > + expr_gstr_print(prop->visible.expr, r); > + str_append(r, "\n"); > + } > + > menu = prop->menu->parent; > for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { > bool accessible = menu_is_visible(menu); > -- > 2.24.1 > -- Best Regards Masahiro Yamada