From patchwork Mon May 3 23:11:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1473543 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=JALGIjYJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FYzfT0m4Pz9sCD for ; Tue, 4 May 2021 09:27:45 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F259182B41; Tue, 4 May 2021 01:27:37 +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="JALGIjYJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2BD982E2B; Tue, 4 May 2021 01:18:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (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 AE05B82D3A for ; Tue, 4 May 2021 01:12:32 +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-io1-xd2a.google.com with SMTP id a11so5525252ioo.0 for ; Mon, 03 May 2021 16:12:32 -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=hDt25gAcjocUwE/qDAKN96u08BVUtBqAnE4Em/ZWuKQ=; b=JALGIjYJ3R45BhJxN/ZcvFDmmHnyRZFMcUldLZnbDAq8gnIHqJxS7dAi8sY6aOR3YH 8qojv3pmFcQsgpC8BpZGxhkHk/axlXknhTndsNd9wCoDsYZc24VLmBGSlxoJF7GYK5TY HVJSz+bNETmSw9zVJE3HK8cAKxcsxQqcVvBnw= 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=hDt25gAcjocUwE/qDAKN96u08BVUtBqAnE4Em/ZWuKQ=; b=foWz7QxPjy3m5gYgaKM6GYbznquGBE0MYQkZ9LgvpXpHYAT/HAdIxEKb9YmDdWSmWE 9TSd8X/IGau+hbe72tlMBsNpReJUNadrqJ02GYc6qqI4VjtyR5r3awDUHh3K/ZodmigV pA4B5oWcyQXx7ycYkEu9tKHOcZLTRenAdRXwPWNl8Eag13AYukDc2WSQedhPRRS1DLPc Q/7f8pEG8xKjFRpxSQqPBkAJfjruY2kAyAoWcHZTyDOKllHuiYz++vD3eduLKMMVuzej fBVT+dBP2j6AFP7CItnv3QZnKLYZaUWIi0zK9nbkLVjni+60SGYe9Ms8Pq+G1afhZUgK jRuw== X-Gm-Message-State: AOAM531gGhOm6sDhWeYr5tZmWdvRdsAQJwp61noLjlIrrohoVwqGbAQI U3Ca7I3AYuWIFHqaMtFZg7QHOHxy2xb4kg== X-Google-Smtp-Source: ABdhPJwVQeYa/052T8YkO6EGsz/a2t227KGlPMATVHoEv6sV+k4+1GMesd3m3lVUlrp+m+VfbCWaDA== X-Received: by 2002:a5d:80d5:: with SMTP id h21mr16653617ior.11.1620083551321; Mon, 03 May 2021 16:12:31 -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 o6sm422727ioa.21.2021.05.03.16.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 16:12:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Bin Meng , Robert Marko , Andre Przywara , Masahiro Yamada , Simon Glass , Alexandru Gagniuc , Joe Hershberger , Joel Stanley , Marek Vasut , Michal Simek , Sebastian Reichel Subject: [PATCH 41/49] image: Drop #ifdefs for fit_print_contents() Date: Mon, 3 May 2021 17:11:28 -0600 Message-Id: <20210503231136.744283-14-sjg@chromium.org> X-Mailer: git-send-email 2.31.1.527.g47e6f16901-goog In-Reply-To: <20210503231136.744283-1-sjg@chromium.org> References: <20210503231136.744283-1-sjg@chromium.org> MIME-Version: 1.0 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.102.4 at phobos.denx.de X-Virus-Status: Clean Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 3ee306143b3..f8aa61fc99d 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -165,7 +165,6 @@ int fit_get_subimage_count(const void *fit, int images_noffset) return count; } -#if CONFIG_IS_ENABLED(FIT_PRINT) /** * fit_image_print_data() - prints out the hash node details * @fit: pointer to the FIT format image header @@ -375,6 +374,9 @@ void fit_print_contents(const void *fit) const char *p; time_t timestamp; + if (!CONFIG_IS_ENABLED(FIT_PRINT)) + return; + /* Indent string is defined in header image.h */ p = IMAGE_INDENT_STRING; @@ -477,6 +479,9 @@ void fit_image_print(const void *fit, int image_noffset, const char *p) int ndepth; int ret; + if (!CONFIG_IS_ENABLED(FIT_PRINT)) + return; + /* Mandatory properties */ ret = fit_get_desc(fit, image_noffset, &desc); printf("%s Description: ", p); @@ -570,10 +575,6 @@ void fit_image_print(const void *fit, int image_noffset, const char *p) } } } -#else -void fit_print_contents(const void *fit) { } -void fit_image_print(const void *fit, int image_noffset, const char *p) { } -#endif /* CONFIG_IS_ENABLED(FIT_PRINT) */ /** * fit_get_desc - get node description property