From nobody Mon Feb 9 05:53:13 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 43C47C0015E for ; Thu, 3 Aug 2023 08:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232691AbjHCI3n (ORCPT ); Thu, 3 Aug 2023 04:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbjHCI2n (ORCPT ); Thu, 3 Aug 2023 04:28:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8E233ABB for ; Thu, 3 Aug 2023 01:26:34 -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 5D42E61CCA for ; Thu, 3 Aug 2023 08:26:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13A1BC433CB; Thu, 3 Aug 2023 08:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691051193; bh=rn5AmJ5E/u7lh73YUSkNYYV834iPfRhN7MTY5kuEYCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CbezDcat3shX2zfrmg6PkoJ/65zTYhPlOAtKfzmczIszpdh+JJml7scBrPVvcoOBP VflOIGvOE+x3y/7ylXmDYH5QGx1ukl18ef4zTfG6zukIE0pqwcvb3MiUX1Ye1IOfcj 8k1bvJZq20Dw0EnVx46+yu5hxKnBuAmawbS/UctWBlB1G7ihVMQZfXDaSQsV6Prd5P E446Xl+ZKzEme2A/O523tgSQmQL8aeuI5ImnG3u7YAdx8MDmNq86c4n+R//xEFF5QV dfltEeXhaNlptcUWYfbKqRoAn67xxKgKOKUsMlYJrpFV8lQ4/6xHZa3qsr6cOrmfb7 G/Cx63Bg3dUCQ== From: Arnd Bergmann To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , linux-kernel@vger.kernel.org, x86@kernel.org, Arnd Bergmann Subject: [PATCH v3 4/7] x86: purgatory: include header for warn() declaration Date: Thu, 3 Aug 2023 10:26:16 +0200 Message-Id: <20230803082619.1369127-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230803082619.1369127-1-arnd@kernel.org> References: <20230803082619.1369127-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