Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2399968imu; Thu, 24 Jan 2019 12:06:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN7oTmwRbpg3rNVo5900C4CiiholkWwUPGqeOlVYmKWFlOteaiu9o6W1Yn8i6ypwGpL9jo3x X-Received: by 2002:aa7:8542:: with SMTP id y2mr8009738pfn.83.1548360398666; Thu, 24 Jan 2019 12:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548360398; cv=none; d=google.com; s=arc-20160816; b=xcmoccyizguFuJfDn96SuInN6OY+0oIqj3rJfdKA/ifid2YfK3BP/JJI9lLMIbYqk2 zNuhwUfxfTNAFLWHprpL4aUjn+lixqq4xN5QjdD5CQ5hdqMbg8+4/BjgvX8jXP6V0Pzx bfKX8qWT/L/oGwxzamWueNvW/wQurpY6Q2UjGmhGOJNEX31ZDjbFgfKw2AgvahCUx0Hf SKd7HtxxZe1Huz2Ezqrtn9r7GzZkc+CQ4Bvc5HcVL7bWrUkSJanWQxIjkHbEcMhmf6pl nSsYgH6XBONGms+Mg5MKAWjX2cuIvFD03K4V5V1SS9ksuBiTD7bz9t0Buox9PzrZHhlo xbdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9BwpJTfWCG+4UJUWbPr9RzXT+5bJFANgaogC7x2kjV8=; b=kswZs8h+1//3U5TOeFkBuG6rcWzd45M76h9Ld51aQ9imQkli/wMoLL88y2y87zLdbX sETSMYE+iAkZn/gEHbSW0MV4pG/nhWzdCpWx3amFm+HZ5b+eREUiihmlay6O6nq/CV4u XHxhddNv4hVPYjOS4StX6szMQw8B3Gb7HbYknshQDusDzTNXvisUZGdTiL3apK4SN6jh GVatJcfn5Xih/XpIE3xXJV7suYlsZJuVn9/qFZWs4fhaTea7KfJoI8G4K+eozaUlb7EB dR/ZLUsHXvX6UotzwQNAG4+2qRnK3zvLMcdgU77Ou49ysDEbFLYNciRLA2047oZ/c+bG vbog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=peJmATbD; 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 h3si22723778pgl.468.2019.01.24.12.06.20; Thu, 24 Jan 2019 12:06:38 -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; dkim=pass header.i=@kernel.org header.s=default header.b=peJmATbD; 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 S1731589AbfAXTbS (ORCPT + 99 others); Thu, 24 Jan 2019 14:31:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:58930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731578AbfAXTbP (ORCPT ); Thu, 24 Jan 2019 14:31:15 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 63A4B218D4; Thu, 24 Jan 2019 19:31:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548358273; bh=c7WYxYLbtO7a/XIZXl76WvIYuPYCB+lhaKXvc+fA9xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=peJmATbD0ojrQQIkhP+Q0A5jIOTfWxVBa9kjda2KgcCAIu1LhCEENMwXKgfGOAclv jkrS8Q6iZiErSAelSX/2mw+2wbYg3ZhSQLvcP4azL8yhTO7gtAY6DlANRjSfdiElrv 4tI7egWj9sDwpbod7ibmezaTWkN5KnICSFn/VOTg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Borislav Petkov , Yi Wang , Michael Matz , x86@kernel.org, Sasha Levin Subject: [PATCH 4.14 15/63] x86/mce: Fix -Wmissing-prototypes warnings Date: Thu, 24 Jan 2019 20:20:04 +0100 Message-Id: <20190124190156.773844622@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124190155.176570028@linuxfoundation.org> References: <20190124190155.176570028@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 68b5e4326e4b8ac9080835005d8254fed0fb3c56 ] 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 Signed-off-by: Sasha Levin --- arch/x86/include/asm/traps.h | 6 +++--- arch/x86/kernel/cpu/mcheck/mce_amd.c | 5 +++-- arch/x86/kernel/cpu/mcheck/therm_throt.c | 3 ++- arch/x86/kernel/cpu/mcheck/threshold.c | 3 ++- 4 files changed, 10 insertions(+), 7 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 beec0daecbc5..4fa97a44e73f 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; @@ -823,7 +824,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..ee229ceee745 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 @@ -390,7 +391,7 @@ static void unexpected_thermal_interrupt(void) static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt; -asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r) +asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *regs) { entering_irq(); trace_thermal_apic_entry(THERMAL_APIC_VECTOR); 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); -- 2.19.1