From nobody Tue Dec 16 17:01:00 2025 Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.67.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A0631448D5; Mon, 7 Apr 2025 07:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.132.67.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744011477; cv=none; b=PrXQgLQ7zBhKi9mI9KpY1LGGXgGQQjhZ6hrrLNUFM+r79IHPH2S9U9/9oD3gNcYVlWtFmsUfWtSk6gtO+7xqlbdRABMrycNjOeLwTYEYk1Rqlpi2MEPuztpyBVdk3/o3KS258w9PML8YHkikPqE9XjMsOJ8SfNS/4HQOr4jFFVo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744011477; c=relaxed/simple; bh=/O6Rbhr6AzoHMZf+3CoXgWuQVv4trTtl/NYJeoc+md8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UdmKTFPU1EQfqxeSJOUOvz3z0bWPU2YkvHYmh72ET1ZXrLIPm7Aj9v12q1rFglQPacbmM8rZYlkczumquE1Uyt7vrhJ72r0kwMWmOjC9AXvP98ZMcIJoLPn5f2rwErKf4JXDjU/X87Jz79pIu9PrCdhbR7x8goxdQLCyCG2B7j8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b=dHcmbjUa; arc=none smtp.client-ip=114.132.67.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b="dHcmbjUa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1744011451; bh=SBqHbmT8GZqmsXFKwL7S/7VVJLbOp2xAK/sZMZYxjeo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=dHcmbjUapNWvjgvDJ6WyKK95WL/R1BCNL+yf010+sKGJCFojIiCBbnF6A+AKRVDz2 Anccf3Mo01nm2NkgDeDWyWOzV1tCLcWQNLsOPXDLfERqD2W98pc91I8t1K9Le4jPPZ 6HoBb+lK90Y32v0Aixc3PJsuDZxe2zSYr6yaXx3c= X-QQ-mid: bizesmtpip3t1744011407t9be885 X-QQ-Originating-IP: iSfGfpxYd9FTrfg41x2/1UisvpU3DSv0Zk6FQk+jQqc= Received: from localhost.localdomain ( [localhost]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 07 Apr 2025 15:36:43 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 5477581190852730679 EX-QQ-RecipientCnt: 8 From: WangYuli To: wangyuli@uniontech.com Cc: guanwentao@uniontech.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, macro@orcam.me.uk, niecheng1@uniontech.com, tsbogend@alpha.franken.de, zhanjun@uniontech.com Subject: [PATCH 3/6] MIPS: dec: Create reset.h Date: Mon, 7 Apr 2025 15:36:19 +0800 Message-ID: <8E88DD5074AF3B33+20250407073622.495364-3-wangyuli@uniontech.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <11740B01E659CAFF+20250407073158.493183-1-wangyuli@uniontech.com> References: <11740B01E659CAFF+20250407073158.493183-1-wangyuli@uniontech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-QQ-S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ZGdBrDEyJuSsg/HZNXUmAORpZAGuQrAHtq5GT0KtHcFutrsTl4aC9Kbk+P13y iwnbHO9g== X-QQ-XMRINFO: Nq+8W0+stu50PRdwbJxPCL0= X-QQ-RECHKSPAM: 0 Declare externally used functions in reset.c to resolve compilation warnings. Fix follow errors with gcc-14 when -Werror: arch/mips/dec/reset.c:22:17: error: no previous prototype for =E2=80=98dec_= machine_restart=E2=80=99 [-Werror=3Dmissing-prototypes] 22 | void __noreturn dec_machine_restart(char *command) | ^~~~~~~~~~~~~~~~~~~ arch/mips/dec/reset.c:27:17: error: no previous prototype for =E2=80=98dec_= machine_halt=E2=80=99 [-Werror=3Dmissing-prototypes] 27 | void __noreturn dec_machine_halt(void) | ^~~~~~~~~~~~~~~~ arch/mips/dec/reset.c:32:17: error: no previous prototype for =E2=80=98dec_= machine_power_off=E2=80=99 [-Werror=3Dmissing-prototypes] 32 | void __noreturn dec_machine_power_off(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/mips/dec/reset.c:38:13: error: no previous prototype for =E2=80=98dec_= intr_halt=E2=80=99 [-Werror=3Dmissing-prototypes] 38 | irqreturn_t dec_intr_halt(int irq, void *dev_id) | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors make[7]: *** [scripts/Makefile.build:207: arch/mips/dec/reset.o] Error 1 make[7]: *** Waiting for unfinished jobs.... In passing, also correct the include file ordering in setup.c as it doesn't merit a separate commit. Link: https://lore.kernel.org/all/Z8A0JeFYfBxXOFCD@alpha.franken.de/ Signed-off-by: WangYuli Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- arch/mips/dec/prom/init.c | 3 +-- arch/mips/dec/reset.c | 2 ++ arch/mips/dec/setup.c | 9 ++------- arch/mips/include/asm/dec/reset.h | 20 ++++++++++++++++++++ 4 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 arch/mips/include/asm/dec/reset.h diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c index 8d74d7d6c05b..a8393052a443 100644 --- a/arch/mips/dec/prom/init.c +++ b/arch/mips/dec/prom/init.c @@ -18,7 +18,7 @@ #include =20 #include - +#include =20 int (*__rex_bootinit)(void); int (*__rex_bootread)(void); @@ -88,7 +88,6 @@ static void __init which_prom(s32 magic, s32 *prom_vec) =20 void __init prom_init(void) { - extern void dec_machine_halt(void); static const char cpu_msg[] __initconst =3D "Sorry, this kernel is compiled for a wrong CPU type!\n"; s32 argc =3D fw_arg0; diff --git a/arch/mips/dec/reset.c b/arch/mips/dec/reset.c index 3df01f1da347..ee1ad38f4a69 100644 --- a/arch/mips/dec/reset.c +++ b/arch/mips/dec/reset.c @@ -10,6 +10,8 @@ =20 #include =20 +#include + typedef void __noreturn (* noret_func_t)(void); =20 static inline void __noreturn back_to_prom(void) diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c index 87f0a1436bf9..6b100c7d0633 100644 --- a/arch/mips/dec/setup.c +++ b/arch/mips/dec/setup.c @@ -18,10 +18,10 @@ #include #include #include +#include #include #include #include -#include =20 #include #include @@ -48,14 +48,9 @@ #include #include #include +#include #include =20 - -extern void dec_machine_restart(char *command); -extern void dec_machine_halt(void); -extern void dec_machine_power_off(void); -extern irqreturn_t dec_intr_halt(int irq, void *dev_id); - unsigned long dec_kn_slot_base, dec_kn_slot_size; =20 EXPORT_SYMBOL(dec_kn_slot_base); diff --git a/arch/mips/include/asm/dec/reset.h b/arch/mips/include/asm/dec/= reset.h new file mode 100644 index 000000000000..c1557b88264c --- /dev/null +++ b/arch/mips/include/asm/dec/reset.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Reset a DECstation machine. + * + * File created to eliminate warnings; copyright from reset.c. + * + * Copyright (C) 199x the Anonymous + * Copyright (C) 2001, 2002, 2003 Maciej W. Rozycki + */ + +#ifndef __ASM_DEC_RESET_H + +#include + +extern void __noreturn dec_machine_restart(char *command); +extern void __noreturn dec_machine_halt(void); +extern void __noreturn dec_machine_power_off(void); +extern irqreturn_t dec_intr_halt(int irq, void *dev_id); + +#endif /* __ASM_DEC_RESET_H */ --=20 2.49.0