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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B26BEC1B08C for ; Thu, 15 Jul 2021 10:32:29 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CA48A613DA for ; Thu, 15 Jul 2021 10:32:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA48A613DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 08A9D81E1C; Thu, 15 Jul 2021 12:32:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1626345147; bh=1WeG3Naj7saY/60ctfI2on0qAzCWXQUNbE0HW+qPovs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CBYVgeFqt5uaQd9mIJLLB2SGrc12oX+TuC2Uzz5QbsvNCIcyleI/FahhiGmQitxpk HIbS443QTp9PBNpPeRlBkaeCiBK1bfqFjVnkItfzMqQc3+95IQIQUhwQ2ac2aBq6Ui h64SmIfBUGwvnB0oCppkKHlKa6W3bxoNreQm7EIrvhyG/GlGnJM0pSTD4mHvrRM27M Pf1CR3sxP4p+3SBhEiJcKvMfOmQK3ZaBq9vwPr7UprPSTxS9zx2rSPBGJT+sa8qBtL +uBqWRANZ3qqAuFnmnzSqhkG+gjgwYL1cxA1ghwaLUHzRGeh3cPM9aNBdMzf0EOShG lIRTmevD2Z5QQ== Received: by phobos.denx.de (Postfix, from userid 109) id E032581F7B; Thu, 15 Jul 2021 12:32:25 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:1::465:204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EEC28803B2 for ; Thu, 15 Jul 2021 12:32:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4GQW064x5rzQjrd; Thu, 15 Jul 2021 12:32:22 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id y7uqAPr3n0HX; Thu, 15 Jul 2021 12:32:19 +0200 (CEST) Subject: Re: [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Andre Heider , =?UTF-8?Q?G=c3=a9rald_Kerma?= , Konstantin Porotchkin , Baruch Siach , Fabio Estevam , Peng Fan Cc: u-boot@lists.denx.de References: <20210714143729.2396-1-pali@kernel.org> From: Stefan Roese Message-ID: Date: Thu, 15 Jul 2021 12:32:18 +0200 MIME-Version: 1.0 In-Reply-To: <20210714143729.2396-1-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-MBO-SPAM-Probability: X-Rspamd-Score: -3.08 / 15.00 / 15.00 X-Rspamd-Queue-Id: 9A92518B4 X-Rspamd-UID: 9d9232 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean On 14.07.21 16:37, Pali Rohár wrote: > Ensure that 'env default -a' always set correct value to $fdtfile, even > when custom user variable is already stored in non-volatile env storage > (means that env_get("fdtfile") call returns non-NULL value). > > As default value is now correctly set like if specified at compile time in > CONFIG_EXTRA_ENV_SETTINGS, there is no need to set $fdtfile explicitly via > env_set("fdtfile", ...) call. > > So remove wrong skip based on env_get("fdtfile") and then also unneeded > env_set("fdtfile", ...) call. > > Fixes: c4df0f6f315c ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable") > Signed-off-by: Pali Rohár All patches: Applied to u-boot-marvell/master Thanks, Stefan > --- > board/Marvell/mvebu_armada-37xx/board.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c > index 6a0e2fc3cd8f..53408d37af9b 100644 > --- a/board/Marvell/mvebu_armada-37xx/board.c > +++ b/board/Marvell/mvebu_armada-37xx/board.c > @@ -133,9 +133,6 @@ int board_late_init(void) > device_unbind(dev); > } > > - if (env_get("fdtfile")) > - return 0; > - > /* Ensure that 'env default -a' set correct value to $fdtfile */ > if (ddr4 && emmc) > strcpy(ptr, "fdtfile=marvell/armada-3720-espressobin-v7-emmc.dtb"); > @@ -146,10 +143,6 @@ int board_late_init(void) > else > strcpy(ptr, "fdtfile=marvell/armada-3720-espressobin.dtb"); > > - /* If $fdtfile was not set explicitly by user then set default value */ > - if (!env_get("fdtfile")) > - env_set("fdtfile", ptr + sizeof("fdtfile=")); > - > return 0; > } > #endif > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de