Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1847054imu; Sat, 10 Nov 2018 02:52:43 -0800 (PST) X-Google-Smtp-Source: AJdET5dnqk/HRb6V1Wq35tH43eTMrHq2W9UmPGiogI75jDdJkLgbyAQsR+KlrIIm1gunCwsWEXG0 X-Received: by 2002:a17:902:7c87:: with SMTP id y7-v6mr12476684pll.232.1541847163161; Sat, 10 Nov 2018 02:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541847163; cv=none; d=google.com; s=arc-20160816; b=F0sJ3RctLif05AId9uDoGi12Zvm2qNdMcMY/sHib6ueqPiJSnjJBA1KnMWHbUt3Hf/ twhO85q7iPBZTWPVdThoc8m5/GZBYU6CocSPIkm3rDNx0XbomBSXk48Clnk9IEcZS3Av Qpfuo2W4+6Wp3o2fsArxINSQs1M1j1AVOcHre8r1vtbx+zY7+9mcphPxffI5wxi3tthy EHHdLnevixn42ho3V+OLhWiHiOuUr157s+G2JsZezGJyQsr+KFGCCwIt9N7IDrU/zRha uFFBXQFYeUCdeFie11vr3OdbeZJPHO+5uX863PSolL5VkuSU6PgU1SUVZ8tFi85byXao PG4w== 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=KOVxNinoU69ujcO8q/JSRepjPwYTtBgicGq6XWN+VW4=; b=f8TCCjzWb7dpX1EyStUuEBfYYi7FpdJGOVNeO4NhWwixdBJhkgJRLqcvDU2sJrzjaw rQSluL/wRQ3C95ziqXPvo/489qFN+lYBhordqamWQ7He7wHPPG5nI2R96scMU0sbgt32 yeU6X/5h3Y2Zwu1u+j6KMU3sVAQfT4+g2Bq8V6QunuaSaVT/qfQ0drrNA8dgF54sIpwX K/Wwh+gtN4XQvDlkqKjpqrL/EYlk95+CZDZOI3bFlLzXS+WByPiFqWCg5mHxtI9tpNme B6Ha0mBw0UKZVWNnQllqxZMOUcKKvqQmfEj+yoPKrnHX9qdeQrNZbQVdSrI2xD8ObsH4 1PDQ== 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 g11-v6si8982994pgs.179.2018.11.10.02.52.26; Sat, 10 Nov 2018 02:52:43 -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 S1728959AbeKJUgj (ORCPT + 99 others); Sat, 10 Nov 2018 15:36:39 -0500 Received: from terminus.zytor.com ([198.137.202.136]:35015 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728876AbeKJUgj (ORCPT ); Sat, 10 Nov 2018 15:36:39 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wAAApuHt2757105 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 10 Nov 2018 02:51:56 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wAAApuag2757102; Sat, 10 Nov 2018 02:51:56 -0800 Date: Sat, 10 Nov 2018 02:51:56 -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: wang.yi59@zte.com.cn, bp@suse.de, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, matz@suse.de, linux-kernel@vger.kernel.org Reply-To: hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, wang.yi59@zte.com.cn, bp@suse.de, linux-kernel@vger.kernel.org, matz@suse.de In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:ras/core] x86/mce: Fix -Wmissing-prototypes warnings Git-Commit-ID: d813dfb28641306f66cf1e2c3586f39ab4f84b27 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: d813dfb28641306f66cf1e2c3586f39ab4f84b27 Gitweb: https://git.kernel.org/tip/d813dfb28641306f66cf1e2c3586f39ab4f84b27 Author: Borislav Petkov AuthorDate: Fri, 9 Nov 2018 23:13:13 +0100 Committer: Borislav Petkov CommitDate: Sat, 10 Nov 2018 11:19:16 +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/kernel/cpu/mcheck/mce_amd.c | 3 ++- arch/x86/kernel/cpu/mcheck/therm_throt.c | 3 ++- arch/x86/kernel/cpu/mcheck/threshold.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index dd33c357548f..87499b997039 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; diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 2da67b70ba98..8a2a842d1a72 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(void) { 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..b0c60beb6312 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