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 339F1C05027 for ; Wed, 8 Feb 2023 11:33:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F0E8585CFB; Wed, 8 Feb 2023 12:33:02 +0100 (CET) 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=1675855983; bh=b/Ggd6FkrCpiHeWLHxFugSXxVZjx2NbY0Ps8wBF9sGQ=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=a5UGJDjUvz+g9lZge4oM/8NAgRVY1J+XWRCWLPxYIRyvt1f/shjAK1cB8KZJlIuyk 24osKbeNgx7LWbsyPRMuoPMy5M6JMs528z1cSXZcRl4/54fR8h8xeV/+Oj4ILn3hMu CFu7tpe1Zds/3JzzOcqTS8+KC4BIaMEsLC/vMbQ8blXJqDLLJ2XbGXWeTf+nM2wNdm yqeK2CHoELaZY7pLvldQRYG5KZn3zZmlP4XhosBB501WwxqJX7yQ0klPGauWBlg7TI 4AtB2XJrUg/0x154/K33NAHRenycfnFOgJVFLkVH/h2Tl81Kfwnftj2qD578/W8F38 GBYVMBOUHLOoA== Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 268B485BA0; Wed, 8 Feb 2023 12:33:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1675855980; bh=b/Ggd6FkrCpiHeWLHxFugSXxVZjx2NbY0Ps8wBF9sGQ=; h=From:To:Cc:Subject:Date:From; b=oRfJ7f/uIlsZ3dJ47i7gHChBOlUrKkwoZJ8W4D/2qnkFtZD5wNKk73n+Y40Ravivy qWRyezO152PcXsqWfkd5pRVYVZZzpJUA1KkhGYIgEXt9xnHGEcL0MrGYOpse9KsNJd 0KkSQxkXomi+X65i6BfrFvpnWGRWk9UEyNQIC/x3KIfvv4shbbeU+ZiYzg3GRTXTrh 3QNlM4lGn7h9lKR92x/pG9pFXeabHPv6Unk7EGrhVAlh+Kk8fQ+Qu7gSoIm+Lheo7o kQEgWAmCp+hDWohtdam3SwCKBt9cy1S99I3muy39ZpKEcLDqJxRS7hVZ/VVrKe4Q8c b4EaR1ylGVw+w== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Patrice Chotard , Patrick Delaunay , Tom Rini Subject: [PATCH 1/2] env: mmc: Clean up macro usage Date: Wed, 8 Feb 2023 12:32:43 +0100 Message-Id: <20230208113244.131488-1-marex@denx.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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. 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(-) 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) 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 = PARTITION_U_BOOT_ENVIRONMENT; efi_guid_t type_guid; @@ -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 } /* round up to info.blksz */ @@ -121,7 +119,7 @@ static inline s64 mmc_offset(int copy) } /* 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 = mmc_offset_try_partition(NULL, copy, &val); if (!err) return val; -- 2.39.1