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 4D3EDC636CC for ; Wed, 8 Feb 2023 15:22:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A75885D72; Wed, 8 Feb 2023 16:22:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="Nsbullfs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 613FE85D7F; Wed, 8 Feb 2023 16:22:52 +0100 (CET) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (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 5468585D5E for ; Wed, 8 Feb 2023 16:22:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf33.google.com with SMTP id i12so11607471qvs.2 for ; Wed, 08 Feb 2023 07:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PGNFhBwGSKq9A8WRMimAxbLKTYWzLm+Qg3wadbNVk7Y=; b=Nsbullfs8zGjazOPtJ1cxxcVO0xR8ZS/P360IbmIN1FnLSbn9KOwPN2w91ONuQNQND 8yb7TgKloomBTGHBroy1wH8NL5P3wfUZ9tLGW4+9ktCkHHuSO9b1fyLckUYBdiSgI6NX e4hKq/pww+6KGOwUAnTU+E3Ie7gR5FjhMgL8I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PGNFhBwGSKq9A8WRMimAxbLKTYWzLm+Qg3wadbNVk7Y=; b=hFwdDSdfSO5Q0J1tWH/2Se1j65WP7U0yLgF2ywvEwPg1oop6Lpz6GjQGWv2XcwoWdw bk0ONf5zp7bNnH6PQTeWeHDgK+PLPYfQszretC3SLZUUM8T5bZi3f8xJkQScYf8te2uN fP0g7G1H6+oRlhL/on4gVckA4/wz/iEFtocrH7jecXtHaiWMCUS0/6PTlul+iDhlY9Py +e1/hD5mpGnGfkNfTU96wAvjeZmvUxOB7BwOZRHcmY02TBw44aDZ/3DA7YbO/tcOXNRQ O4CDPwGga40jn3rqtGb+uYBOAnbaUUkH00WqbkT/Ns+ohFDkAfkLOlkDPg1EcXnOnda9 cydQ== X-Gm-Message-State: AO0yUKUVZ7GsyavnffwT9YvOI2o5d5+ujoN3X9px9NhNeZEB4wTX340j 6gSaqUjxeYstlJ7MYnj38H9cYC1hsIpxVfxelfE= X-Google-Smtp-Source: AK7set+WZ/p/esa2Eb8ZNxYyJT+B5gIj4cheE18M8uD5+TnQS/G+x5Hpjq7CN1D+R2GtaIiSD0qERg== X-Received: by 2002:a05:6214:29ec:b0:56b:ef53:8893 with SMTP id jv12-20020a05621429ec00b0056bef538893mr3838853qvb.8.1675869768169; Wed, 08 Feb 2023 07:22:48 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-90cc-7e59-435b-3104.res6.spectrum.com. [2603:6081:7b00:6400:90cc:7e59:435b:3104]) by smtp.gmail.com with ESMTPSA id o28-20020ac8429c000000b003b880ef08acsm11659839qtl.35.2023.02.08.07.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 07:22:47 -0800 (PST) Date: Wed, 8 Feb 2023 10:22:45 -0500 From: Tom Rini To: Marek Vasut Cc: u-boot@lists.denx.de, Patrice Chotard , Patrick Delaunay Subject: Re: [PATCH 1/2] env: mmc: Clean up macro usage Message-ID: References: <20230208113244.131488-1-marex@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k7Wtqr53ob1wiWCW" Content-Disposition: inline In-Reply-To: <20230208113244.131488-1-marex@denx.de> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --k7Wtqr53ob1wiWCW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 08, 2023 at 12:32:43PM +0100, Marek Vasut wrote: > Consistently use 'if (CONFIG_IS_ENABLED(PARTITION_TYPE_GUID))' instead of > mix of ifdef and IS_ENABLED. This deals with xPL variants of the config > option and trims ifdeffery. >=20 > Signed-off-by: Marek Vasut > --- > Cc: Patrice Chotard > Cc: Patrick Delaunay > Cc: Tom Rini > --- > env/mmc.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/env/mmc.c b/env/mmc.c > index 5b01f657a7a..b34a8dd982e 100644 > --- a/env/mmc.c > +++ b/env/mmc.c > @@ -73,8 +73,7 @@ static inline int mmc_offset_try_partition(const char *= str, int copy, s64 *val) > =20 > if (str && !strncmp((const char *)info.name, str, sizeof(info.name))) > break; > -#ifdef CONFIG_PARTITION_TYPE_GUID > - if (!str) { > + if (CONFIG_IS_ENABLED(PARTITION_TYPE_GUID) && !str) { > const efi_guid_t env_guid =3D PARTITION_U_BOOT_ENVIRONMENT; > efi_guid_t type_guid; > =20 > @@ -82,7 +81,6 @@ static inline int mmc_offset_try_partition(const char *= str, int copy, s64 *val) > if (!memcmp(&env_guid, &type_guid, sizeof(efi_guid_t))) > break; > } > -#endif > } > =20 > /* round up to info.blksz */ > @@ -121,7 +119,7 @@ static inline s64 mmc_offset(int copy) > } > =20 > /* try the GPT partition with "U-Boot ENV" TYPE GUID */ > - if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { > + if (CONFIG_IS_ENABLED(PARTITION_TYPE_GUID)) { > err =3D mmc_offset_try_partition(NULL, copy, &val); > if (!err) > return val; I don't think this is right as we don't have xPL options for PARTITION_TYPE_GUID and do want to have the same environment location used in all stages (aside from when xPL says it only has no where for the env), yes? --=20 Tom --k7Wtqr53ob1wiWCW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPjvkUACgkQFHw5/5Y0 tyx49gv/fypGdeO8/keFmBUVl7e6rVUESg8fKMczj2bt4NlMHRssTTVMkndQEEu+ 2zxZFNACO9uQyPPtU79VepVLOSKEB+OLLWSt2rHRKB3Pc50nnhBN1Bbsi4q1yRXx QJwinijazsA412RdK6KILuQlPjqVS66uqT/XwK9+0rR7O+N4Yjs5Wap4DuzJDy+Y gdauNCSvxbDZ9aGzNFFlEK+zZ/d+CLKpFRwZpgO4pqJMZBJNWTYd5UWTzQXYx3Fv 1U3DCUrcW/lmusBXgiX90flUXnCRHvrKPoyJ8mjW2CaABLllkl6pIESwqfGxcAXX yQ9xWKnwVXHWw9Q8gbn+7Z2XaUL0kvMuR0p+k7QBwC863JPZPMwmw3hAonaGkOgO aRUzktYU6bx7q1PeHsoPHo1anmembw8yCPGR5Fd48Qf/OVdd0rUPdICbiYIXc2tp NMyEDr7+oDgFIZ8xCCt6qr72jR3lZlUAweM3Zh9xIwk2H4B7Tpizw7puC+l/HM0P kXOPTpHQ =y/Ib -----END PGP SIGNATURE----- --k7Wtqr53ob1wiWCW--