Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4531427rwo; Tue, 25 Jul 2023 07:26:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEflwy+xvsYBj1OnA84wnqLRpOlJw4Um1bLAljxnbVHQR8Yjm7j7QvrftlIcevaD4ldX+pV X-Received: by 2002:a17:907:7757:b0:99b:627b:e962 with SMTP id kx23-20020a170907775700b0099b627be962mr14070153ejc.47.1690295169653; Tue, 25 Jul 2023 07:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690295169; cv=none; d=google.com; s=arc-20160816; b=dc4hRz6ITPBpSZzF5nh6mG9Jhd5luai3lZ7lRbbcQv/uyx/XnMDG/N8SM4jkVT/bKF jQr/IOj3ICq8iZKnJVLZQxlle7TvrVwHdehkNZOajmJZBKRAWQVVzUk5aaJRohCTAEZ9 x/31nS+V2I3Yqttm4MZ3+zHz9sqKbVVdsvndFMx6uFYln2yL7ebFJrIT1niOFC/LybTD DFUrvMPMaY7NUF/pn2i5kAZNylS2XWwStPB2mE7Fn2/A2x18OZYY1Q48wzOi0WZtIJ96 TD46QipHuth/w0OiKHtoYFXOjZ4x4l7hCXzUggCTwxHIwzhgK/kDew0PI2jQZR1zpP5N /h/g== 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=LRhsHgUsRHK8N/Uf/5iQjmoXkEzplKU7aLwK1K5jM3o=; fh=R523ZnP4N7O48iGEbgKYBfM0eoofLeWRxo/bWq35Los=; b=lal480i+EIh+WYiZagEXRXb2pppTvwRkeA7sykJ94zirXYsR3c3Kv+lmsg/feoaPhS 7z3Evrp7xU+k9F9lHdC22tNTsCo2TGoqFMg1OZ9nH+z5j68zXUQk+BA+WwmS0Roq5wvH +JQX5VS5GykXomj3lmqXnDmo/Q5pvJM/mbGxfey2ytP3FeEBD1yRMzVVKlBwzeqPR+ZH VkD2N7vLJ8QANIA1IN5mE0Oti/Cs/a+1w3aveYkslIT9R9TiY6hPtWyJySU/nGYBAgxv YEJP9n+PzPUMSIB0/XO2yOfEEmjUarZD/hneTZZRGmpx/BJC70fw0jlkxSO9hDYjoTo3 NRdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E5EJ5sFE; 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 lx11-20020a170906af0b00b009930c030830si8292698ejb.633.2023.07.25.07.25.44; Tue, 25 Jul 2023 07:26:09 -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=E5EJ5sFE; 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 S231708AbjGYNtO (ORCPT + 99 others); Tue, 25 Jul 2023 09:49:14 -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: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 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" -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 86fe33b937154..31f9e080d61a8 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; void panic(const char *fmt, ...) __noreturn __cold; 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 +#include "../boot/compressed/error.h" #include "../boot/string.h" u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(".kexec-purgatory"); -- 2.39.2