Message ID | 20210503231136.744283-12-sjg@chromium.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) 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=ITVXqR66; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4FYzfk0zkqz9sCD for <incoming@patchwork.ozlabs.org>; Tue, 4 May 2021 09:27:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 26AB482B6C; Tue, 4 May 2021 01:27:45 +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="ITVXqR66"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AFBFB82CA6; Tue, 4 May 2021 01:27:42 +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-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 C8E9282D33 for <u-boot@lists.denx.de>; Tue, 4 May 2021 01:12:30 +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-xd31.google.com with SMTP id f6so268462iow.2 for <u-boot@lists.denx.de>; Mon, 03 May 2021 16:12:30 -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=XwEREbCXgwLoJHZnPUjR/LG/urogRry738ak0vmULuQ=; b=ITVXqR66dH9fwV8BfBSk+COD/JK142CUhaQZPqV1Onr7teHB9xANkNl58niFIoeBoN Ui+a+cE0KkB4iXxGPaJ+x1/R3w91apcSBNEcmhJIM+sAg5soTqbsAd415HJvO1wbTy7Q uzqqWoTt4RSMVXJL+4R/uGpXd1p+IcSG1q/1w= 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=XwEREbCXgwLoJHZnPUjR/LG/urogRry738ak0vmULuQ=; b=H4pwqB3JqdNNZ8Taofo8qPuNjNKtPlJHWN7zYeFXQy8NTOu3b6kjm5wIq/secbyIl9 SITJhuUkpU5vTG+jyAZe6dFou5h1pamRH3D9nTEJWLxRYHADlyniupaWSA1P6LrRPYuF aQolzZ8IRBY6r+7541LZGUrAIQYi+8LwVmUKC6mxblx3dTx2WhlCOIwX97nZHe6+lykH d5pGsHa/H5K5JkjATLrRpv8YS4NFV88XM25inRdxeuOqYjQADLiTAVa4R9B5fw6+4KBR KgWB4q2hfqjIAENURS2uXVGySA4s5A5BrQ0aEmZLgn9/7dBH6pA13QzglSWJ9CwKkSfc 3eqg== X-Gm-Message-State: AOAM533FCN6RG4LuwZHzYeSpmIAnHKTY6jYub4amUPHrcZoQg83NBWix yopbQm9sMua7op3XvrRPeXPx/3ULTHzmLA== X-Google-Smtp-Source: ABdhPJwRkitMRMq8Xodu/mHQtWj4Ev5ogf8eCvd3l3JPmbfznVNTfEFqRIf8jdsjvvKd9aeZPljSNg== X-Received: by 2002:a5d:81c8:: with SMTP id t8mr16686686iol.19.1620083549412; Mon, 03 May 2021 16:12:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 16:12:29 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Tom Rini <trini@konsulko.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Bin Meng <bmeng.cn@gmail.com>, Robert Marko <robert.marko@sartura.hr>, Andre Przywara <andre.przywara@arm.com>, Masahiro Yamada <masahiroy@kernel.org>, Simon Glass <sjg@chromium.org>, AKASHI Takahiro <takahiro.akashi@linaro.org>, Alexandru Gagniuc <mr.nuke.me@gmail.com>, Joe Hershberger <joe.hershberger@ni.com>, Marek Vasut <marex@denx.de>, Naoki Hayama <naoki.hayama@lineo.co.jp>, Reuben Dowle <reubendowle0@gmail.com>, Tero Kristo <t-kristo@ti.com> Subject: [PATCH 39/49] image: Tidy up fit_unsupported_reset() Date: Mon, 3 May 2021 17:11:26 -0600 Message-Id: <20210503231136.744283-12-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 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean |
Series |
image: Reduce #ifdefs and ad-hoc defines in image code
|
expand
|
diff --git a/common/bootm_os.c b/common/bootm_os.c index 0b6325db660..70fad4efb55 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -58,6 +58,14 @@ static void copy_args(char *dest, int argc, char *const argv[], char delim) } #endif +static void __maybe_unused fit_unsupported_reset(const char *msg) +{ + if (CONFIG_IS_ENABLED(FIT_VERBOSE)) { + printf("! FIT images not supported for '%s' - must reset board to recover!\n", + msg); + } +} + #ifdef CONFIG_BOOTM_NETBSD static int do_bootm_netbsd(int flag, int argc, char *const argv[], bootm_headers_t *images) diff --git a/include/image.h b/include/image.h index 9adbda8ab70..d7e0c829841 100644 --- a/include/image.h +++ b/include/image.h @@ -1412,19 +1412,6 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo); struct cipher_algo *image_get_cipher_algo(const char *full_name); -#if CONFIG_IS_ENABLED(FIT_VERBOSE) -#define fit_unsupported(msg) printf("! %s:%d " \ - "FIT images not supported for '%s'\n", \ - __FILE__, __LINE__, (msg)) - -#define fit_unsupported_reset(msg) printf("! %s:%d " \ - "FIT images not supported for '%s' " \ - "- must reset board to recover!\n", \ - __FILE__, __LINE__, (msg)) -#else -#define fit_unsupported(msg) -#define fit_unsupported_reset(msg) -#endif /* FIT_VERBOSE */ #endif /* CONFIG_FIT */ #if !defined(USE_HOSTCC)
This function is only used in one place and does not need to use the preprocessor. Move it to the C file and convert it to a normal function. Drop fit_unsupported() since it is not used. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) common/bootm_os.c | 8 ++++++++ include/image.h | 13 ------------- 2 files changed, 8 insertions(+), 13 deletions(-)