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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 BA5D9C07E95 for ; Fri, 2 Jul 2021 19:07:35 +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 3C1506141C for ; Fri, 2 Jul 2021 19:07:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C1506141C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 6D8C882BCE; Fri, 2 Jul 2021 21:06:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="CBM6ysh1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DFBFA829EC; Fri, 2 Jul 2021 21:06:44 +0200 (CEST) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 21CFC8290A for ; Fri, 2 Jul 2021 21:06:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32a.google.com with SMTP id x22-20020a9d6d960000b0290474a76f8bd4so9424016otp.5 for ; Fri, 02 Jul 2021 12:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZvTxvMVKM7ATPSZsHJil16oZ6ZUsR4JKTWlsSQz0XFA=; b=CBM6ysh1gaqhdb1KpZ+TLCVPYnOLNjUGceBP6EB8wd8fspSi4CKj9SUorpElkNyiqF GEMaIrdLqLaT0hZGu5ZhaTVDa0FO8p8Cv/SYiXL12CMsdEPyqAA4KfzTqHFy1EcbWK2V Y5HrMfwvcLVYG9pQGl6d+2VWJSbtJOHA45fL8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZvTxvMVKM7ATPSZsHJil16oZ6ZUsR4JKTWlsSQz0XFA=; b=qqRZ0sMqeNcTm5Y+h7DYzAzXG8DNOEBge8/4k8pcAIdaNPOJJ6rNqhUmsV10tkWOLB 7uTSjciXzHmGFIbddoG+vHltwlmzzfiVTUav8/TLB9FR6x+ycPPmAV1dkx1xff/YnQQR M7Uu+8ERe5OhIlHe8rR7bHJdBu0oiM9YZqcoRXylQTh51iNmK7pkyr5+OtMZZLVybgRe 0Qodrs8b1mOzyIY7pvo8Qcb90CPKT5icpMPckauxXZAuc+b4I3P/cEFkU2Q8B/8S+CD5 xBBAuP+4rjF4hCsTbGdqXspVdb6Oq94UU17/jN92tcIvfIRx6Vsv3m+ZoFKOb9NSwZ7Y PXPw== X-Gm-Message-State: AOAM531EfGmNadlRMBtBVChgBQ3nsmtB+Ljq2uJ1g7GdUjhQlDR+D7j3 fXNOP/0fZpgwXnuq2/EgLYmnYGeSIKe/BgSt X-Google-Smtp-Source: ABdhPJwCrC9Kt10sKlVn/11sqVW9TFFdvHKvq/eoCf7DohfTCfTe+7ytAjAJ/kxluKA+YQgCduS5OQ== X-Received: by 2002:a05:6830:142:: with SMTP id j2mr666146otp.26.1625252796509; Fri, 02 Jul 2021 12:06:36 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id v8sm772625oth.69.2021.07.02.12.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 12:06:36 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Mark Kettenis , Heinrich Schuchardt , Simon Glass Subject: [PATCH v2 3/9] disk: Tidy up #ifdefs in part_efi Date: Fri, 2 Jul 2021 12:36:14 -0600 Message-Id: <20210702123614.v2.3.I7bd629335158b7fc7203d59ae04f1895b65f9382@changeid> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog In-Reply-To: <20210702183620.1542680-1-sjg@chromium.org> References: <20210702183620.1542680-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This file does not correctly handle the various cases, sometimes producing warnings about partition_basic_data_guid being defined but not used. Fix it. There was some discussion about adjusting Kconfig or making HAVE_BLOCK_DEVICE a prerequisite for PARTITIONS, but apparently this is not feasible. Such changes can be undertaken separate from the goal of this series. Signed-off-by: Simon Glass --- Changes in v2: - Update commit message disk/part_efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index 0fb7ff0b6bb..fdca91a6974 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -29,12 +29,13 @@ DECLARE_GLOBAL_DATA_PTR; -/* - * GUID for basic data partions. - */ +#ifdef CONFIG_HAVE_BLOCK_DEVICE + +/* GUID for basic data partitons */ +#if CONFIG_IS_ENABLED(EFI_PARTITION) static const efi_guid_t partition_basic_data_guid = PARTITION_BASIC_DATA_GUID; +#endif -#ifdef CONFIG_HAVE_BLOCK_DEVICE /** * efi_crc32() - EFI version of crc32 function * @buf: buffer to calculate crc32 of @@ -1126,4 +1127,4 @@ U_BOOT_PART_TYPE(a_efi) = { .print = part_print_ptr(part_print_efi), .test = part_test_efi, }; -#endif +#endif /* CONFIG_HAVE_BLOCK_DEVICE */ -- 2.32.0.93.g670b81a890-goog