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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A624C433F5 for ; Sun, 26 Sep 2021 01:49:19 +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 4D36161090 for ; Sun, 26 Sep 2021 01:49:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D36161090 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FD2A835FF; Sun, 26 Sep 2021 03:47:48 +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="QqVpVrwa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B3623835A6; Sun, 26 Sep 2021 03:44:59 +0200 (CEST) Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 9A0B1835D8 for ; Sun, 26 Sep 2021 03:44:12 +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-x334.google.com with SMTP id r43-20020a05683044ab00b0054716b40005so12045963otv.4 for ; Sat, 25 Sep 2021 18:44:12 -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=LU507esBxnO6wT67ucezUBFBMUvgZyFxOCdelQhU+JY=; b=QqVpVrwaZrWLDQ2P0F9M8ACKby7aF/tkdM1wnAV12D2N9IGxTieMxZWclH/Hx4sfPh dHUgZbB5HeEw1+rYR8bLUvhTvSfy4l5kkP2M4ZEZL0wiSsqEprC/8GsbahmdkL5PBqHN anarVVkW5GMesbtyYw6TP7aDWPTaN+laWw0/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LU507esBxnO6wT67ucezUBFBMUvgZyFxOCdelQhU+JY=; b=pw4AsWZ5iPLu2suP66P1IpC0SORaHpa8C59m9lWDY8A1TosiNAwcD5v9kFrsj3DQIu AUelNqLKvS1XhTXZVVwGxagBVmFQ6y9TQ9CyvbL+cSlfpzDm+RN7gRtIjLpdiU69Uhom VpX8Ao8ofdlhp42a3UhltKnh0iglCXeY+4VG/qs72p678Fq4SaOrHIs+uNVNf6pMVBn9 Aox6kAOQYXIX2rRqybKDfOLS1aF5/yQP++8puJNelwZxi7UNrVx+1diioKJeQFH4BLhB wa8XizN11dY7jHBPgoCUhUw3ZPW5poYtVL//dsWKsTsd3m1PE3BvoxbuNCxIvYQWhqsO KZLQ== X-Gm-Message-State: AOAM532Fv49EhiwuLhy2yoZPrffdq+pIt96gE99i8OIxUAe4QXHA7IJ6 vKQgXzBEeS4XBg54lJQW6VAIiRTHEyYPqQ== X-Google-Smtp-Source: ABdhPJw/92DODRxGge19fF+h8/z4850RuGfIV6dNy7VDLt0Lt8JLt5DDhCqG/PHOrRfscEPlw0hGnQ== X-Received: by 2002:a05:6830:24b8:: with SMTP id v24mr11245472ots.100.1632620650985; Sat, 25 Sep 2021 18:44:10 -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 c18sm330378otr.72.2021.09.25.18.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Sep 2021 18:44:10 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Alexandru Gagniuc , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Tom Rini , Simon Glass , Joe Hershberger , Marek Vasut Subject: [PATCH v5 21/29] image: Drop #ifdefs for fit_print_contents() Date: Sat, 25 Sep 2021 19:43:34 -0600 Message-Id: <20210926014342.127913-15-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog In-Reply-To: <20210926014342.127913-1-sjg@chromium.org> References: <20210926014342.127913-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 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 2f20bb7e446..3952ab749ad 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -170,7 +170,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 @@ -380,6 +379,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; @@ -482,6 +484,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); @@ -575,10 +580,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 -- 2.33.0.685.g46640cef36-goog