From patchwork Thu Aug 3 15:59:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 130745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1286961vqx; Thu, 3 Aug 2023 10:07:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9UQTql13e5fUriLEDeg6fpcMj1s2/ex1awQABbhv9QJzX6hzjDn8fzvHR+SPkOZLkDGL4 X-Received: by 2002:a81:8ac7:0:b0:54f:9cd0:990 with SMTP id a190-20020a818ac7000000b0054f9cd00990mr18063832ywg.18.1691082438914; Thu, 03 Aug 2023 10:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691082438; cv=none; d=google.com; s=arc-20160816; b=ydwka9y4K4CNCIWZ7bgxySD3wakRoz3lY937DKNRvFCOU4JnwZzYpZygQX7Z4Hz1V5 4bIhGPEzY31ATgwETRAXmrJH+eLqYQ7FrZBe2qf9crc/AQNnyXkHkhw0dJ2H4HqBHVeP ezMNz/bJH2I84go5l3kUbYuByET7za0rU/Lmuhdk3hjTN2R7UeDGqZEiI+0bRDMx285J hDnvXY04i9rJatRUZjpnWKfZ3c93Uq3andYKSJRfkyOLCiVzB4XK00n4LJ9NdJ6GpQEn gj+GTy8G25shdwRTYozsLWAhM58Tt3BYe0ALYQlF2XV4cdYgbOy/DTPVhhFtqrrJpVDz 1+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=7Y/CjetvjY5uFuYteC4d6UqH4YG+n/luPhJHaaNAgT4=; fh=GmswEOGbKr3VXwADkGMdbYvANKaeXXy9MxNXblyNAM0=; b=STcWX3A542KY2Xs8iy+ZkaZhzKa88GFZqRnOOZP7m+xBw3WS1KSzH28Y3EONJCJJ8i Hx7EPH+qtS4ZB/DoNQfdxJ7KJieLxUr7NOVCNQCPAcg81A/aA5qGnzBZsEAsBmk5sGbN 5AbiLadb6A/+YJBYPguAJHR7r3Orvn587lQeMEzrNHO4TuNUV3d+lIeofeNrKAx0t6VT T5fZGhdcNudOFnT9ZyaRtdx+SHdLxpHiOmGCnqRHZOovt1mKHnvgi16QIABazeA9A0fN GgWIH+t7PGF3khr8OuDzzKFTzt35cUxAM9rxd88kHjKEgaOdAfJjjuiTBC55pSZlW0V6 ygPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=K8FHM6hD; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a631c12000000b0055fdd2c3fd4si193696pgc.22.2023.08.03.10.06.54; Thu, 03 Aug 2023 10:07:18 -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=@linutronix.de header.s=2020 header.b=K8FHM6hD; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233758AbjHCP7Y (ORCPT + 99 others); Thu, 3 Aug 2023 11:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235398AbjHCP7R (ORCPT ); Thu, 3 Aug 2023 11:59:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67AFB115; Thu, 3 Aug 2023 08:59:16 -0700 (PDT) Date: Thu, 03 Aug 2023 15:59:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691078355; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7Y/CjetvjY5uFuYteC4d6UqH4YG+n/luPhJHaaNAgT4=; b=K8FHM6hD4+iwY1zjud/2m+APX4VhYcNLxX5gkoSvDRLTvdEeD0Q+3yabm1jYWmsh6oaPOZ G+xXsvqKRk6XZk/NR0R5gUNPjn6AHd/cXS1SisH3fp8NNy538MPI/hCucc6vppBBK3DHkG L5UjHQn5EMU5L+Tf8DPWSV4PGj42xc4imUIa5thyCRa4OnF6GsJgMga22CgQ4rQSRTWmnt 4NuzDS0ljDILiW7m9Hb41+8itNdeIne0ZdyIeXmodISH8fBbokvq9R4pRON0DM1EmMnIvt qMuma8EhwSh3klea2WiiZ2oADUt2ckvY8tJwL37aWAfZSTfIVuap3/VaTvqpqQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691078355; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7Y/CjetvjY5uFuYteC4d6UqH4YG+n/luPhJHaaNAgT4=; b=ZTfh4YLqRp9UpN5Y33hVGHYgCGuW0VAJ9kUKvQCHD+8eHucqUFKQI0X1MkUsPYB4tsoP1f W67qxasPEbCpBqAQ== From: "tip-bot2 for Arnd Bergmann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/purgatory: Include header for warn() declaration Cc: Arnd Bergmann , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230803082619.1369127-5-arnd@kernel.org> References: <20230803082619.1369127-5-arnd@kernel.org> MIME-Version: 1.0 Message-ID: <169107835437.28540.15117483789537490130.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773228459230541967 X-GMAIL-MSGID: 1773228459230541967 The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 6d33531bc0234332572ae612232d947f353a4450 Gitweb: https://git.kernel.org/tip/6d33531bc0234332572ae612232d947f353a4450 Author: Arnd Bergmann AuthorDate: Thu, 03 Aug 2023 10:26:16 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Thu, 03 Aug 2023 16:37:18 +02:00 x86/purgatory: Include header for warn() declaration The purgatory code 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 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 Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230803082619.1369127-5-arnd@kernel.org --- 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 5313c5c..19a8251 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 86fe33b..31f9e08 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 7558139..aea47e7 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");