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 B3FB9C61DA4 for ; Thu, 23 Feb 2023 16:32:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 996DF85764; Thu, 23 Feb 2023 17:32:39 +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="P5WblWbw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D828A843B5; Thu, 23 Feb 2023 17:32:36 +0100 (CET) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 BA628843B5 for ; Thu, 23 Feb 2023 17:32:31 +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-qt1-x82d.google.com with SMTP id s12so11417705qtq.11 for ; Thu, 23 Feb 2023 08:32:31 -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=pk2QpSlfXIz9iUpLYLxACdFwYuFc8GG58xK85BSbRVk=; b=P5WblWbwGbtHViDAMv1SYJRizrpUuM4RB9L0k8ThEQwa7mUQ83O6vTTyK+M+rOqm42 +TPb00X4cBeT2Uwj64o+rGYSICtLX6ItbYht/tZ9dBZHfemslo85byuKYWZ/8nsODKkO 5FCU0DopiZzN8c6b6Sz4Nqz4dqZa5rnkvWz+I= 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=pk2QpSlfXIz9iUpLYLxACdFwYuFc8GG58xK85BSbRVk=; b=zFfn36tAWKEjM26/Apjeg+dZQqwmE/UiivDZz39jfQaaE900S5sx7pjbJ4r8Q8l4Wn uYJw3uZ0p0/9GXTQ5jzzYtiJQm7Vo31Mr6IWRWYlTH6q5mPInM6c9tIbX7DxgS0V/VsN ZZFAHD/dmb3ArlxWiqKZperkz89QRJuksD6cN/PNnuBPw/wXU3gIld6CvNwIgxBKbhr8 7rOQ9QAMfVYuJOvJRKV1EXUXuG+K+6EQjZ0H26H6fr5eUnkwJUziDtmYxp/RTIi8qiIb w/zAP249eyJUKqdGYYtNU+t3D8eyz3dkcsGxUd4T5Z+R83jUWIjcSFY+N4noYzcMvQhC 7vhQ== X-Gm-Message-State: AO0yUKVAahPRQ8LFyJA9ai7wCF06iDRmm+HqL3SCqLHx3Ntx4qcpgR3/ eXQRd3DMIFT2qMD8Xikjc544xNn/fzpV0t7D3F4= X-Google-Smtp-Source: AK7set/LIx10mM1VyT3pLZjuK3EP8dReH9rIIDbBy70a/Ya1eQnCuRy3IQXo8VXgThaKzd2DzIM09g== X-Received: by 2002:ac8:5a52:0:b0:3b4:7efb:36a7 with SMTP id o18-20020ac85a52000000b003b47efb36a7mr21078706qta.27.1677169950505; Thu, 23 Feb 2023 08:32:30 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-b87e-a945-7631-50d9.res6.spectrum.com. [2603:6081:7b00:6400:b87e:a945:7631:50d9]) by smtp.gmail.com with ESMTPSA id c11-20020ac81e8b000000b003b9ba2cf068sm5221474qtm.56.2023.02.23.08.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 08:32:30 -0800 (PST) Date: Thu, 23 Feb 2023 11:32:28 -0500 From: Tom Rini To: Marek Vasut Cc: Patrick DELAUNAY , u-boot@lists.denx.de, Patrice Chotard Subject: Re: [PATCH v2 1/2] env: mmc: Clean up macro usage Message-ID: References: <20230209123010.31953-1-marex@denx.de> <1125e79c-222b-ba3a-e342-81f609dbb68a@foss.st.com> <2dd5b09a-515f-601d-e973-4404bfc42ea8@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+s8RobND0VC2lilQ" Content-Disposition: inline In-Reply-To: <2dd5b09a-515f-601d-e973-4404bfc42ea8@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 --+s8RobND0VC2lilQ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 23, 2023 at 02:22:51PM +0100, Marek Vasut wrote: > On 2/23/23 11:41, Patrick DELAUNAY wrote: > > Hi Marek, >=20 > Hi, >=20 > > On 2/9/23 13:30, Marek Vasut wrote: > > > Consistently use 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instea= d of > > > mix of ifdef. > > >=20 > > > Signed-off-by: Marek Vasut > > > --- > > > Cc: Patrice Chotard > > > Cc: Patrick Delaunay > > > Cc: Tom Rini > > > --- > > > V2: Replace CONFIG_IS_ENABLED(PARTITION_TYPE_GUID) with > > > IS_ENABLED(CONFIG_PARTITION_TYPE_GUID) > > > --- > > > =A0 env/mmc.c | 4 +--- > > > =A0 1 file changed, 1 insertion(+), 3 deletions(-) > > >=20 > > > diff --git a/env/mmc.c b/env/mmc.c > > > index 5b01f657a7a..d51a5579128 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) > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0 if (str && !strncmp((const char *)info.na= me, str, > > > sizeof(info.name))) > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break; > > > -#ifdef CONFIG_PARTITION_TYPE_GUID > > > -=A0=A0=A0=A0=A0=A0=A0 if (!str) { > > > +=A0=A0=A0=A0=A0=A0=A0 if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID) && = !str) { > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 const efi_guid_t env_guid =3D= PARTITION_U_BOOT_ENVIRONMENT; > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 efi_guid_t type_guid; > > > @@ -82,7 +81,6 @@ static inline int mmc_offset_try_partition(const > > > char *str, int copy, s64 *val) > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (!memcmp(&env_guid, &type_= guid, sizeof(efi_guid_t))) > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break; > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0 } > > > -#endif > > > =A0=A0=A0=A0=A0 } > > > =A0=A0=A0=A0=A0 /* round up to info.blksz */ > >=20 > >=20 > > If I remenber, I try this test with IS_ENABLED when I propose my patch > >=20 > > and I have compilation issue on next line > >=20 > >=20 > > +=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 uuid_str_to_bin(info.type_guid, type_gui= d.b, > > UUID_STR_FORMAT_GUID); > >=20 > >=20 > > because "info.type_guid" don't exist in struct disk_partition > >=20 > > see ./include/part.h:59 > >=20 > >=20 > > struct disk_partition { > > =A0=A0 =A0lbaint_t=A0=A0=A0 start;=A0=A0=A0 /* # of first block in par= tition=A0=A0=A0 */ > > ... > > #ifdef CONFIG_PARTITION_TYPE_GUID > > =A0=A0 =A0char=A0=A0=A0 type_guid[UUID_STR_LEN + 1];=A0=A0=A0 /* type = GUID as string, if > > exists=A0=A0=A0 */ > > #endif > > ... > > }; >=20 > Uh, which defconfig triggers this ? >=20 > Also, is there a way to deal with this failure without reinstating the if= def > ? Tom ? It's likely on one of the platforms that disables EFI_LOADER, where this ends up being a fail to build. I don't recall which, but I've seen it before. So we probably don't end up converting this to a macro check. --=20 Tom --+s8RobND0VC2lilQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmP3lRwACgkQFHw5/5Y0 tywFYQv/ZR9T1eJululnigEU7Bd/9lP/c6gngsfuD3lo2brP1Edzo9M7JdLzfifU fTbj3zb57ekc/ZzJr36K/ONmEulbuPER41eXk28I8ZqZHF2OtnHsxALFn0tOc5m0 0lFYJEUGJ5g3rkaPn+cRG/nbAtNn5rAxO5dNXcqWGoq+QOPncUYXQwr1ceZ404uy 3FeFFCh5IL0e74utMl/MIyHILCQNY3jeOd7JpuXlJuhcs7RkWDlJvuBpaPbqVuAN UW5MBM/9Bom/Pp1d5kjAUUMBFG0JAG1loa8jCvXC5ic3i2idIHjZT2oZ4yw1ioD5 /x2hcfzkeOQwkGL1VpmgboENFtU6Em/wKEVuncKHesJoqaEZ1wxVL+Ez3Tw0KUw5 a46LdI5WKBn7EcunC/RCgKUcMT2jWgQxBVSz3kK16PtQTVieuG74XNR3zfAxI6HC Z767WQPa7WjtFaDyVB2sEOSQ93TJ1P+GXumiR0JkBLjdIiEF8A26bLHLOGrkGeKs Tc6VcwIw =fIYD -----END PGP SIGNATURE----- --+s8RobND0VC2lilQ--