From nobody Sun Feb 8 09:10:16 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6758C0015E for ; Tue, 25 Jul 2023 13:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231731AbjGYNtQ (ORCPT ); Tue, 25 Jul 2023 09:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231704AbjGYNtE (ORCPT ); Tue, 25 Jul 2023 09:49:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3F241FF7 for ; Tue, 25 Jul 2023 06:48:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A84C6170C for ; Tue, 25 Jul 2023 13:48:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E522C433C9; Tue, 25 Jul 2023 13:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690292936; bh=rn5AmJ5E/u7lh73YUSkNYYV834iPfRhN7MTY5kuEYCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E5EJ5sFExzL+l6ZHXgg7hLHU7rqWQA/ZT1COpzpppHrOGcDkiH6orSN/Rm9g/Rspz X+mTZwvX7S10EtizGzoOqonpuVw12/qXHokPsgiyabe1j0THXHLqdkkUguxVBaUbPJ 9gzfJh2FG3ThHGVj/PGS+eB3U2V9/vnIICo2dpFUBZ/q8MnRtu2pGNNoIoia+2+eqS OG8ETn9mz2HduZMTeoiRW54UED6y2Ewu8T8bcZ7tvmT3cCkaxBv6JfJ9A2CScDc6xS ZFv0SlajI3hptFRrcSxspED7h8hLREWIa28NpE4guqJF91O+vmUmPyjibDxPS0GEoo QdjeVM1AmT3yw== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 4/5] [RESEND] x86: purgatory: include header for warn() declaration Date: Tue, 25 Jul 2023 15:48:36 +0200 Message-Id: <20230725134837.1534228-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230725134837.1534228-1-arnd@kernel.org> References: <20230725134837.1534228-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The purgatory code has uses parts of the decompressor and provides its own warn() function, but has to include the corresponding header file to avoid a -Wmissing-prototypes warning. It turns out that this the function prototype actually differs from the declaration, so change it to get a constant pointer in the declaration and the other definition as well. Signed-off-by: Arnd Bergmann --- arch/x86/boot/compressed/error.c | 2 +- arch/x86/boot/compressed/error.h | 2 +- arch/x86/purgatory/purgatory.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/boot/compressed/error.c b/arch/x86/boot/compressed/er= ror.c index 5313c5cb2b802..19a8251de506a 100644 --- a/arch/x86/boot/compressed/error.c +++ b/arch/x86/boot/compressed/error.c @@ -7,7 +7,7 @@ #include "misc.h" #include "error.h" =20 -void warn(char *m) +void warn(const char *m) { error_putstr("\n\n"); error_putstr(m); diff --git a/arch/x86/boot/compressed/error.h b/arch/x86/boot/compressed/er= ror.h index 86fe33b937154..31f9e080d61a8 100644 --- a/arch/x86/boot/compressed/error.h +++ b/arch/x86/boot/compressed/error.h @@ -4,7 +4,7 @@ =20 #include =20 -void warn(char *m); +void warn(const char *m); void error(char *m) __noreturn; void panic(const char *fmt, ...) __noreturn __cold; =20 diff --git a/arch/x86/purgatory/purgatory.c b/arch/x86/purgatory/purgatory.c index 7558139920f8c..aea47e7939637 100644 --- a/arch/x86/purgatory/purgatory.c +++ b/arch/x86/purgatory/purgatory.c @@ -14,6 +14,7 @@ #include #include =20 +#include "../boot/compressed/error.h" #include "../boot/string.h" =20 u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(".kexec-purgatory= "); --=20 2.39.2