Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E07EC433EF for ; Tue, 15 Feb 2022 11:52:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B267836A8; Tue, 15 Feb 2022 12:52:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VSlgVgn3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF0B0836BE; Tue, 15 Feb 2022 12:52:40 +0100 (CET) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D205580FDD for ; Tue, 15 Feb 2022 12:52:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ed1-x531.google.com with SMTP id w10so13006582edd.11 for ; Tue, 15 Feb 2022 03:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=slC8L5rgFdReZP4gPMnRE9/j/otOFgSkrnMD30gF92c=; b=VSlgVgn3EceruiPQati+ccjR4pCaoITfuph8ARJPP9Z5DxJ4m4Cv1Vul3yUB/YW75R mQuWlgDMM8ekOLQ7ylXUFhOPZYr+4mKJrtFJsDH6g2hQ5Q22xoV5mQMV/nXOP4BJB+l4 KZBzsfP6tTRFhYLTO4TNH4+Xoz0VeNYfBSyYDwTJFoaz5bhgwQnNz1fMYXm0F/LOz5wg G+Eknkue/re8M1E7HIAu91lIwEQbpEh1RvB5x3nIZ3Pkw5QGzfIj9LA2pJctteA9wEJt cugPoQSD3rs8lpe2gm9I0ldlMo/noHF2o4P1mOTFafIY5HdIKaA2Xckq2jcM36HM30Sz RLpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=slC8L5rgFdReZP4gPMnRE9/j/otOFgSkrnMD30gF92c=; b=1YvGkHxZAHWyJBKnmAO8xZMuQSGJYltDlptPlWyfs5Ah2CTQx6H+Go+q96fM0478Ak 0F4fLRN6/MOCDPCaBqS7GsghbVxApC8/CBQGQmI+B9HCHr4bHe3fwYlb1ZqwctiWnBRe RgZPpsjOHQjhBg2zAX8MUR6VZVmZzdOE2Xasbi4XQ80cFjq0ZzLOPpfRFoaIrzq0/sJm qwHX8w6+ng0xvIPOnG8iV0Ek/7knRR72StuBoDfCIcdHuFdS296z+fiMWpml793HYEXg C4xt1CfC56g7S0daqrBqAEA/p+yN6k1KyvwGScZ4hVbEUeppIAg8Qs8XJBid35yerudB 9uug== X-Gm-Message-State: AOAM531+Tky6eTjbJ0/TImn8dZ1Ui4pKiEEHF/h8z2wjejI6m0fMk1Cp m1lVn3TnMUjG5cmOZjjvyUI= X-Google-Smtp-Source: ABdhPJwMDwVmM9a0cn3egx5UvLtJSMTBLS9uIvD88OXI6eaGGphmoJxOJCuNuYLRLkoctpi8ooXFBg== X-Received: by 2002:a05:6402:1d4b:: with SMTP id dz11mr3564953edb.202.1644925957397; Tue, 15 Feb 2022 03:52:37 -0800 (PST) Received: from [192.168.0.74] ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id h16sm3501143ejj.56.2022.02.15.03.52.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Feb 2022 03:52:36 -0800 (PST) Message-ID: Date: Tue, 15 Feb 2022 14:40:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 From: Alper Nebi Yasak Subject: Re: [PATCH 01/24] moveconfig: Show the config name rather than the defconfig To: Simon Glass , U-Boot Mailing List Cc: huang lin , Jeffy Chen , Kever Yang , Tom Rini , Philippe Reynes , Ivan Mikhaylov , Heinrich Schuchardt , Trevor Woerner References: <20220208185008.35843-1-sjg@chromium.org> <20220208114935.1.I28b16953dd8c39096a959acf715a423090fa5750@changeid> Content-Language: en-US In-Reply-To: <20220208114935.1.I28b16953dd8c39096a959acf715a423090fa5750@changeid> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 08/02/2022 21:49, Simon Glass wrote: > The _defconfig suffix is unnecessary when showing matching boards. Drop > it. > > Signed-off-by: Simon Glass > --- > > tools/moveconfig.py | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/tools/moveconfig.py b/tools/moveconfig.py > index 1bcf58caf1..5ef5a95eb6 100755 > --- a/tools/moveconfig.py > +++ b/tools/moveconfig.py > @@ -91,7 +91,20 @@ SIZES = { > 'SZ_4G': 0x100000000 > } > > +RE_REMOVE_DEFCONFIG = re.compile(r'(.*)_defconfig') > + > ### helper functions ### > +def remove_defconfig(defc): > + """Drop the _defconfig suffix on a string > + > + Args: > + defc (str): String to convert > + > + Returns: > + str: string with the '_defconfig' suffix removed > + """ > + return RE_REMOVE_DEFCONFIG.match(defc)[1] > + I think defc.split('_defconfig')[0] (or defc.partition) would work good enough here and this function may be unnecessary. > def check_top_directory(): > """Exit if we are not at the top of source directory.""" > for fname in 'README', 'Licenses': > @@ -1638,7 +1651,7 @@ def do_find_config(config_list): > print(f"Error: Not in Kconfig: %s" % ' '.join(adhoc)) > else: > print(f'{len(out)} matches') > - print(' '.join(out)) > + print(' '.join([remove_defconfig(item) for item in out])) The square brackets aren't necessary here, but not really harmful either. > > > def prefix_config(cfg):