From mboxrd@z Thu Jan 1 00:00:00 1970 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 69276C77B7A for ; Sat, 13 May 2023 20:29:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 913C785494; Sat, 13 May 2023 22:29:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="mAR8vvIw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3D87B84706; Sat, 13 May 2023 22:29:43 +0200 (CEST) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 EF65985659 for ; Sat, 13 May 2023 22:29:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=francis.laniel@amarulasolutions.com Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f41dceb9d4so82388525e9.1 for ; Sat, 13 May 2023 13:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1684009780; x=1686601780; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aI4hn3xuc/Wfxwx18viRChUcrsHFVpDDup9D5LlISPs=; b=mAR8vvIw1ecIO3cEFjsZu7V0U8NUHkmEipNfvSq+6Ci2lUFlnx14UjapZ2RN+ga8k2 RDzDiSXo65dNsHKNGTWSLLRaF1D01HUQJaoN0erN586aQomUdcISnydEEEVXQDcCPXzj uda4sSgLNVju8yoZXdjV8oMiOJkmFgSQsA8Q0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684009780; x=1686601780; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aI4hn3xuc/Wfxwx18viRChUcrsHFVpDDup9D5LlISPs=; b=lGPEoqGsxuZwLZANCj/JY8TG4E4OHAQ+V8xmsozS5/fd6mroMvBUIawdkLwG9lZilW d4ur4ZM6TwAnIOMt/E00TAdXGjt3wAAFmgiTaHkdd/Igp+7T/FoN7mPYfQGzb8xyshu4 /5KwEE7R8CDU9BoU3k4Q4Maw+P13DubJurrpRE5DMbkjTqFYX7lvBxkVkZ27imZjJSpr 7gb+/QrZq9Ec6PF/tq273QKVY4+0NHcqKb2Dx+rUly+tk6IPcNyXgxcz2f53NNZq/AhX sN4WZt+nSBqtPXSoew6By8GcRf2xq+x69TkMF+cJnf6vlrBRCt8HkaGMKQYDplRlmiAY B/NA== X-Gm-Message-State: AC+VfDzVwxShrLfK9rBi1CheRFoZNRcTc+SxbuMyLAbhfxfwX2Vqj8ac vnA023HXW0Tutbc3vr8PEfo0FAISWrPJQstuBvo= X-Google-Smtp-Source: ACHHUZ6wCIojn9KnF/U8E4a9PUyDF+aUD568OyieRuW/yKXha0gqjgYgYeBRNhwDrJyMkVgSzXYE9A== X-Received: by 2002:a5d:554d:0:b0:306:2aa7:2ecc with SMTP id g13-20020a5d554d000000b003062aa72eccmr17871435wrw.45.1684009780430; Sat, 13 May 2023 13:29:40 -0700 (PDT) Received: from pwmachine.localnet ([213.94.16.214]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b003f4253ddb7dsm18842000wmm.43.2023.05.13.13.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 May 2023 13:29:39 -0700 (PDT) From: Francis Laniel To: Heinrich Schuchardt Cc: Michael Nazzareno Trimarchi , Tom Rini , Simon Glass , Harald Seiler , Hector Palacios , Marek Vasut , Evgeny Bachinin , Stefan Roese , Rasmus Villemoes , Bin Meng , Nikhil M Jain , u-boot@lists.denx.de Subject: Re: [RFC PATCH v8 10/23] global_data.h: add GD_FLG_HUSH_OLD_PARSER flag Date: Sat, 13 May 2023 21:29:38 +0100 Message-ID: <1852668.tdWV9SEqCh@pwmachine> In-Reply-To: <0fa99736-6416-4086-154b-de5f2b581b6a@gmx.de> References: <20230512200331.51457-1-francis.laniel@amarulasolutions.com> <20230512200331.51457-11-francis.laniel@amarulasolutions.com> <0fa99736-6416-4086-154b-de5f2b581b6a@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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.8 at phobos.denx.de X-Virus-Status: Clean Le samedi 13 mai 2023, 02:07:57 WEST Heinrich Schuchardt a =E9crit : > On 5/12/23 22:03, Francis Laniel wrote: > > This flag is used to indicate we are using the hush parser. > >=20 > > Reviewed-by: Simon Glass > > Signed-off-by: Francis Laniel > > --- > >=20 > > common/cli.c | 2 ++ > > include/asm-generic/global_data.h | 4 ++++ > > 2 files changed, 6 insertions(+) > >=20 > > diff --git a/common/cli.c b/common/cli.c > > index 3916a7b10a..e5fe1060d0 100644 > > --- a/common/cli.c > > +++ b/common/cli.c > > @@ -268,6 +268,8 @@ void cli_loop(void) > >=20 > > void cli_init(void) > > { > > #ifdef CONFIG_HUSH_PARSER >=20 > GD_FLG_HUSH_OLD_PARSER should depend on CONFIG_HUSH_OLD_PARSER. I am not sure how to handle this as it would mean having something like thi= s: #ifdef CONFIG_HUSH_OLD_PARSER /** * @GD_FLG_HUSH_OLD_PARSER: Use hush old parser. */ GD_FLG_HUSH_OLD_PARSER =3D 0x400000, #endif #ifdef CONFIG_HUSH_2021_PARSER /** * @GD_FLG_HUSH_2021_PARSER: Use hush 2021 parser. */ GD_FLG_HUSH_2021_PARSER =3D 0x800000, #endif So, this would mean some flag would exist depending on CONFIG_*, which woul= d=20 then make the testing quite hard. Indeed, for now, none of gd_flags is defined depending on some CONFIG_*. Nonetheless, maybe using gd_flags here is not the correct solution? Do you have in mind any idea which would be a better fit? =20 > Running scripts/checkpatch.pl indicates that we should use > IS_ENABLED(CONFIG_*) here. This code was not added in this contribution. I may clean it but the current contribution is quite big, so I would like t= o=20 avoid making it bigger by polishing other code if possible. I will nonetheless checkpatch.pl every commits here for the next version! > Best regards >=20 > Heinrich >=20 > > + if (!(gd->flags & GD_FLG_HUSH_OLD_PARSER)) > > + gd->flags |=3D GD_FLG_HUSH_OLD_PARSER; > >=20 > > u_boot_hush_start(); > > =20 > > #endif > >=20 > > diff --git a/include/asm-generic/global_data.h > > b/include/asm-generic/global_data.h index a1e1b9d640..120f1189ee 100644 > > --- a/include/asm-generic/global_data.h > > +++ b/include/asm-generic/global_data.h > > @@ -654,6 +654,10 @@ enum gd_flags { > >=20 > > * @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags > > */ > > =09 > > GD_FLG_OF_TAG_MIGRATE =3D 0x200000, > >=20 > > + /** > > + * @GD_FLG_HUSH_OLD_PARSER: Use hush old parser. > > + */ > > + GD_FLG_HUSH_OLD_PARSER =3D 0x400000, > >=20 > > }; > > =20 > > #endif /* __ASSEMBLY__ */