From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACE00C3A5A2 for ; Tue, 10 Sep 2019 12:37:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C76821479 for ; Tue, 10 Sep 2019 12:37:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="TpbVM2u4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390519AbfIJMhp (ORCPT ); Tue, 10 Sep 2019 08:37:45 -0400 Received: from mail.skyhub.de ([5.9.137.197]:39492 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390009AbfIJMhp (ORCPT ); Tue, 10 Sep 2019 08:37:45 -0400 Received: from zn.tnic (p200300EC2F0ABE00B4DC6059A6D53D5D.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:be00:b4dc:6059:a6d5:3d5d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A39811EC0688; Tue, 10 Sep 2019 14:37:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1568119063; h=from:from: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:in-reply-to:in-reply-to: references:references; bh=5FBeehAo9pc5CgZTj0+q999A32D9UmnfBNu8W+HSco4=; b=TpbVM2u4W//8pc1HRoJHGnPgZ0FyfRMYT+4ukSUd143i4tw7P37/VSaZlSpuaMsPT0GIFc t24qlw22B1TvyYHvxphd7y/ZXPFmianN2IKfDrYpLyQ279mwLwz2F6CfwBb0NJu9L3LYCO dCWA2hVXsMcieoyma/Qg6lwdBT2TGt8= Date: Tue, 10 Sep 2019 14:37:42 +0200 From: Borislav Petkov To: Tony W Wang-oc Cc: "tony.luck@intel.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "yazen.ghannam@amd.com" , "vishal.l.verma@intel.com" , "qiuxu.zhuo@intel.com" , David Wang , "Cooper Yan(BJ-RD)" , "Qiyuan Wang(BJ-RD)" , "Herry Yang(BJ-RD)" Subject: Re: [PATCH v2 2/4] x86/mce: Make 4 functions non-static Message-ID: <20190910123741.GG23931@zn.tnic> References: <5b5bf41a26674a1c9d67cd7b3822a304@zhaoxin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5b5bf41a26674a1c9d67cd7b3822a304@zhaoxin.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-edac-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org On Tue, Sep 10, 2019 at 08:19:20AM +0000, Tony W Wang-oc wrote: > These functions are declared static and cannot be used in others > .c source file. this commit removes the static attribute and adds > the declaration to the header for these functions. > > Signed-off-by: Tony W Wang-oc > --- > arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- > arch/x86/kernel/cpu/mce/internal.h | 8 ++++++++ > 2 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c > index 88cd959..eee4b12 100644 > --- a/arch/x86/kernel/cpu/mce/intel.c > +++ b/arch/x86/kernel/cpu/mce/intel.c > @@ -423,7 +423,7 @@ void cmci_disable_bank(int bank) > raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); > } > > -static void intel_init_cmci(void) > +void intel_init_cmci(void) > { > int banks; > > @@ -442,7 +442,7 @@ static void intel_init_cmci(void) > cmci_recheck(); > } > > -static void intel_init_lmce(void) > +void intel_init_lmce(void) > { > u64 val; > > @@ -455,7 +455,7 @@ static void intel_init_lmce(void) > wrmsrl(MSR_IA32_MCG_EXT_CTL, val | MCG_EXT_CTL_LMCE_EN); > } > > -static void intel_clear_lmce(void) > +void intel_clear_lmce(void) > { > u64 val; > > @@ -467,7 +467,7 @@ static void intel_clear_lmce(void) > wrmsrl(MSR_IA32_MCG_EXT_CTL, val); > } > > -static void intel_ppin_init(struct cpuinfo_x86 *c) > +void intel_ppin_init(struct cpuinfo_x86 *c) That one doesn't need to get exported. This can easily be missed because you're exporting them in one patch and using them in another. Do the exports in the same patch where you use them for the first time. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette