Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5420799imu; Tue, 13 Nov 2018 06:23:30 -0800 (PST) X-Google-Smtp-Source: AJdET5eqj13v/mN3VvgIQPQBb6AbPH5gphRj25AJgQiLjKxizM4PHBe8sXXkidhvhn3HvTDZMxyO X-Received: by 2002:a17:902:1347:: with SMTP id r7-v6mr5292903ple.238.1542119010628; Tue, 13 Nov 2018 06:23:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542119010; cv=none; d=google.com; s=arc-20160816; b=k2DRPrvY0KQQgbT59MxnzWu4wzk4s6o4dgYdgr4k5peuxa3k2ztBP7Ct5zhBrzcGsH +PYnSmZ2eonU6s6sR0S3lxVb4Tke6um0lRqx+Cj27NMVgnuKgQkepuqDrPuoaci/OIMh 4YJ+qeIvzxRtC30xJrVVnQPmOMYoFkyWIsMNuWaWf0LSZeUm1kNSSzne/xRzk0ibg/wU fXRsM6bh9JsBFU6bSs3vtm8BRkNvw/xPmLvqliwC7P/FcaERaI0MzganLBdPpNdAEtw1 mxgQEk2MzONQH5Kne2HevMGLNPt24J2uVgP4t5C0cTyWYX8NFItkiqWyxVMkEOLfMJ9T jkdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=qU+S7hGlQXrTyXNY1hEu3AqPGhDt402Re2EAhC3bJ/U=; b=rEWD6+ljdGSu4lvtyVE+o+gl5jVCIdin2Mx+KkjLSIgb7y6FHm1lBqQMG9JXAA0TYa +UOmhJtZQ6LMBbhkSITETNd7Ij4Up3k5p72eR5AXIrfbH3o49leEfHeY6UYi1FMuEKwQ qqoCecchkG7SCYox2pp9ufNEDY4VwlUX+2uEM6qzWB3DkZKvM35/ozG76YSnbECLseZt bZyrxSnNdAmMAzB2Yls2DP1PA6iw/xiWDhTeD/xcXOPSsEhSKB5VuvNnf96NNFkvrgX+ wPcx5fADswmydUDcA2JkOo+zCNB8Y1v3uL9DsJgPCgTucUqClayfATT/lRPFUrRwnX/J lwTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si2037847plk.231.2018.11.13.06.22.52; Tue, 13 Nov 2018 06:23:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731386AbeKNAUa (ORCPT + 99 others); Tue, 13 Nov 2018 19:20:30 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47801 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731109AbeKNAUa (ORCPT ); Tue, 13 Nov 2018 19:20:30 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wADELvNs4170736 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 13 Nov 2018 06:21:57 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wADELt0O4170733; Tue, 13 Nov 2018 06:21:55 -0800 Date: Tue, 13 Nov 2018 06:21:55 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Borislav Petkov Message-ID: Cc: hpa@zytor.com, wang.yi59@zte.com.cn, bp@suse.de, mingo@kernel.org, matz@suse.de, linux-kernel@vger.kernel.org, tglx@linutronix.de Reply-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, matz@suse.de, bp@suse.de, hpa@zytor.com, wang.yi59@zte.com.cn In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cleanups] x86/mce: Fix -Wmissing-prototypes warnings Git-Commit-ID: 83a204daa40315a38204493f60768910c8604e9c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 83a204daa40315a38204493f60768910c8604e9c Gitweb: https://git.kernel.org/tip/83a204daa40315a38204493f60768910c8604e9c Author: Borislav Petkov AuthorDate: Fri, 9 Nov 2018 23:13:13 +0100 Committer: Borislav Petkov CommitDate: Tue, 13 Nov 2018 14:55:08 +0100 x86/mce: Fix -Wmissing-prototypes warnings Add the proper includes and make smca_get_name() static. Fix an actual bug too which the warning triggered: arch/x86/kernel/cpu/mcheck/therm_throt.c:395:39: error: conflicting \ types for ‘smp_thermal_interrupt’ asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r) ^~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/kernel/cpu/mcheck/therm_throt.c:29: ./arch/x86/include/asm/traps.h:107:17: note: previous declaration of \ ‘smp_thermal_interrupt’ was here asmlinkage void smp_thermal_interrupt(void); Signed-off-by: Borislav Petkov Cc: Yi Wang Cc: Michael Matz Cc: x86@kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de --- arch/x86/include/asm/traps.h | 6 +++--- arch/x86/kernel/cpu/mcheck/mce_amd.c | 5 +++-- arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 + arch/x86/kernel/cpu/mcheck/threshold.c | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 3de69330e6c5..afbc87206886 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h @@ -104,9 +104,9 @@ extern int panic_on_unrecovered_nmi; void math_emulate(struct math_emu_info *); #ifndef CONFIG_X86_32 -asmlinkage void smp_thermal_interrupt(void); -asmlinkage void smp_threshold_interrupt(void); -asmlinkage void smp_deferred_error_interrupt(void); +asmlinkage void smp_thermal_interrupt(struct pt_regs *regs); +asmlinkage void smp_threshold_interrupt(struct pt_regs *regs); +asmlinkage void smp_deferred_error_interrupt(struct pt_regs *regs); #endif extern void ist_enter(struct pt_regs *regs); diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index dd33c357548f..9c8e2daa48cd 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -99,7 +100,7 @@ static u32 smca_bank_addrs[MAX_NR_BANKS][NR_BLOCKS] __ro_after_init = [0 ... MAX_NR_BANKS - 1] = { [0 ... NR_BLOCKS - 1] = -1 } }; -const char *smca_get_name(enum smca_bank_types t) +static const char *smca_get_name(enum smca_bank_types t) { if (t >= N_SMCA_BANK_TYPES) return NULL; @@ -825,7 +826,7 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc) mce_log(&m); } -asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(void) +asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(struct pt_regs *regs) { entering_irq(); trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR); diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 2da67b70ba98..95a7cfa6de15 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86/kernel/cpu/mcheck/threshold.c index 2b584b319eff..c21e0a1efd0f 100644 --- a/arch/x86/kernel/cpu/mcheck/threshold.c +++ b/arch/x86/kernel/cpu/mcheck/threshold.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -18,7 +19,7 @@ static void default_threshold_interrupt(void) void (*mce_threshold_vector)(void) = default_threshold_interrupt; -asmlinkage __visible void __irq_entry smp_threshold_interrupt(void) +asmlinkage __visible void __irq_entry smp_threshold_interrupt(struct pt_regs *regs) { entering_irq(); trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);