From patchwork Tue Mar 26 22:13:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1916402 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=OhZ0//Sf; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=MpYolbtJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V43yx2lfhz1yWr for ; Wed, 27 Mar 2024 09:15:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09E538807B; Tue, 26 Mar 2024 23:15:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org 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; secure) header.d=mailbox.org header.i=@mailbox.org header.b="OhZ0//Sf"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="MpYolbtJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D737388074; Tue, 26 Mar 2024 23:15:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) (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 1422387B89 for ; Tue, 26 Mar 2024 23:15:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4V43yH5lDwz9sj1; Tue, 26 Mar 2024 23:15:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1711491303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ib/EtBN1t0TyTzVUnMI4gCjHjZqoyK5BXtxGTQ7+9yM=; b=OhZ0//SflAKJMhSgxoaPxcOQWdbRMzvFC4NVc2nSoFI6HFebHKcJ29oNHAhL/qt3sSEQBW XzYhPoEl3yZPUZWs62KUl8hRq7a2x2bjKKeFWQhCxu6d0QlphH4silkeQDr1PolFsqxRFj W78qK4xGlYck46I5icHHdjRH5LPkK85gbVEblyPAfp+kkiV+Hi+UzbwMBEy+OjIkTuCa0y DLbhquOcBMaLa/6q4VbXRJF8mEl6Gr+yNmYARmjxrkJza8DT2TcHo7um6GCkrvGWxeiOU9 wyY1o5s+kBLPQqLxHPLVvMUVana2Xezz94UOpgAia/7BX4gaZ4OxO6aMfhkI5w== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1711491302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ib/EtBN1t0TyTzVUnMI4gCjHjZqoyK5BXtxGTQ7+9yM=; b=MpYolbtJQ3N3hNc142IsnOsuloK3O+PV1v3rcz4D1I0Ta91x1tT8Yo+FN+BezSv2cpARA5 MuYDzTNityxjPL1vF1wJ7ydSve5yZ693IFrAtvlY/PRl7sXgcsTRLuFGENagYYQ3AEPSII znb2HqROu1mCPZ1ioYq8VODEpP4xOz8XB0q81VYTyTtgc/L4r1nwCAIIQnDWyoc5+ToJXA T1kv332ypICPyZLESwl0D4K3ybYuLDKDc7Yu564lOJfpNk6VsTciaSQHYk/Wmqc91neF7S 7B3VXYp6EzMusreli3z6jFpttxjErZpBIbhonATL3aJd6xNk9zgJmBUkhDkQDQ== To: u-boot@lists.denx.de Cc: Marek Vasut , Heinrich Schuchardt , Kuninori Morimoto , Laurent Pinchart , Simon Glass , Tom Rini Subject: [PATCH v4 4/6] boot: fdt: Clean up env_get_bootm_mapsize() Date: Tue, 26 Mar 2024 23:13:14 +0100 Message-ID: <20240326221431.55346-4-marek.vasut+renesas@mailbox.org> In-Reply-To: <20240326221431.55346-1-marek.vasut+renesas@mailbox.org> References: <20240326221431.55346-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 372a62344406fcebcd0 X-MBO-RS-META: s1j4ujrmgpqx6uqf8qqggpxnptmd5i4e 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 Reduce tmp variable use and remove unnecessary type cast in env_get_bootm_mapsize(). This aligns the env variable parsing with env_get_bootm_low(). No functional change. Signed-off-by: Marek Vasut --- Cc: Heinrich Schuchardt Cc: Kuninori Morimoto Cc: Laurent Pinchart Cc: Simon Glass Cc: Tom Rini --- V3: - New patch V4: No change --- boot/image-board.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/boot/image-board.c b/boot/image-board.c index 13876b79026..09b6e4e0bdc 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -149,13 +149,10 @@ phys_size_t env_get_bootm_size(void) phys_size_t env_get_bootm_mapsize(void) { - phys_size_t tmp; char *s = env_get("bootm_mapsize"); - if (s) { - tmp = (phys_size_t)simple_strtoull(s, NULL, 16); - return tmp; - } + if (s) + return simple_strtoull(s, NULL, 16); #if defined(CFG_SYS_BOOTMAPSZ) return CFG_SYS_BOOTMAPSZ;