Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1167751rwd; Tue, 16 May 2023 12:52:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zFDi2bRX/Xz4xrN5WcU9HYjsNlOBFrKuCFRSfzg72Yh3chaAnc+kpyhDKE736tlR9pcwc X-Received: by 2002:a05:6a20:4312:b0:fd:e806:9c95 with SMTP id h18-20020a056a20431200b000fde8069c95mr46178039pzk.13.1684266735112; Tue, 16 May 2023 12:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684266735; cv=none; d=google.com; s=arc-20160816; b=KOnjd8dAhG1fKlPIFTggrPr/7nZ0LQO6Aa5ib3cLAv7wyHnX0srF2OAaw0LJ4Y6cbv mb2OVXwtyAAsdQvpQyO4+y44P4GK6rxbnI+nvwUimpy2ViWLXInf3AcZNO15r4WSdDVU 9lM1Dbv3K0mrjczl+4zNKm0esXTxTNN0fptuWS/ixbLo42rFB3dxG8pj2380sOpFbO9b VsvDu/Ayu56I4i1CEoy5YtWR2yB8s4Gy0/xitABhFZ3ua8MoQs1Ng5FJ2dC1SwIKBS7e ImkGwtaleVsP9Eaha1bVoQ0F+wMjScDX5tdTYf2m6Uifioiav7dB1UbDkru6lmBFp4wK h6hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=icHKauzbPeU9FDUEFYfmuoRkWeYnWnQkSiXz/mjeNYQ=; b=Aq39kh01E/P8y7L0E2YtclFXFCdGVpjkssxmrJW5ziUrJtMbmj06il99KBBRYz8LbR S2pFiocziKgHBh3X+rGd5uv/J4cqKzV5GbYpJQIUCl2VOm468O8Ff351Z8YAir2BgqLI 1Ariyr54UVn1Y7ceBp8HH9EiQ6urYuSXC1rn0p6q5BdaXMqYtkry0DZkVGHtG3BTScvs rYKboP21cPjQQWrG8OOyniSYdVP5gwt3uT4o7KONO1omQOU/3oEjJAiP47w9U67V4S86 Ycc+M7KebwKbEsyG0Pe4nQcNExNKW4LqZacbk+O/GIhhGuzdmpUwWsqPeM03ev4v5w4L EPkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AeITFFPy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020aa78ec9000000b00625c6092a12si20238700pfr.215.2023.05.16.12.52.03; Tue, 16 May 2023 12:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AeITFFPy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjEPTim (ORCPT + 99 others); Tue, 16 May 2023 15:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjEPTi3 (ORCPT ); Tue, 16 May 2023 15:38:29 -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 35B7244A5; Tue, 16 May 2023 12:38:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4096563EC3; Tue, 16 May 2023 19:38:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05AE9C433A0; Tue, 16 May 2023 19:37:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684265883; bh=j24rSNRgDIgmGiT2yXwRSRo4ZogPVSrZkif28sPhRnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeITFFPyf4T1O9Bk8T43ZhPjTAAH6Vi8ipARvhqNOYnVJGtz4HnVAYe+g/BzZ7026 fDFAQ+Kwic0E1tpyAEjk9jRaCFQp+kn6j5QUapAXkZVr+cEC/j8Xd57pjknKmNJ40L YYnEhKGr6uzcXrPYT/H7qqH1VyhkhaztOT4kZMMxyyb3x1FoZRxS3qYbRHji3EIhxJ GIf04p+6OuzTuprxdmvEFq7KckfwLT/GHmqgM9hv9SmOoyBUuMT0F5NhocTm6xphV4 BngR4+JYE7FOd9LAO6LyB06VqLeGQ76wR+h5GIBrwd5zRDNTjAQuZi2Pu27xvTgXI9 pzCAFRefSXgnA== From: Arnd Bergmann To: x86@kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Juergen Gross , "Srivatsa S. Bhat (VMware)" , Alexey Makhalov , VMware PV-Drivers Reviewers , Peter Zijlstra , Darren Hart , Andy Shevchenko , Boris Ostrovsky , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, xen-devel@lists.xenproject.org, linux-pm@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 19/20] x86: purgatory: include header for warn() declaration Date: Tue, 16 May 2023 21:35:48 +0200 Message-Id: <20230516193549.544673-20-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516193549.544673-1-arnd@kernel.org> References: <20230516193549.544673-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/error.c index c881878e56d3..ce5ed7d8265e 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" -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/error.h index 1de5821184f1..87062dea9a20 100644 --- a/arch/x86/boot/compressed/error.h +++ b/arch/x86/boot/compressed/error.h @@ -4,7 +4,7 @@ #include -void warn(char *m); +void warn(const char *m); void error(char *m) __noreturn; #endif /* BOOT_COMPRESSED_ERROR_H */ diff --git a/arch/x86/purgatory/purgatory.c b/arch/x86/purgatory/purgatory.c index 7558139920f8..aea47e793963 100644 --- a/arch/x86/purgatory/purgatory.c +++ b/arch/x86/purgatory/purgatory.c @@ -14,6 +14,7 @@ #include #include +#include "../boot/compressed/error.h" #include "../boot/string.h" u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(".kexec-purgatory"); -- 2.39.2