linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
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,
	DavidWang@zhaoxin.com, CooperYan@zhaoxin.com,
	QiyuanWang@zhaoxin.com, HerryYang@zhaoxin.com
Subject: Re: [PATCH v4 2/4] x86/mce: Make 3 functions non-static
Date: Mon, 30 Sep 2019 18:25:51 +0200	[thread overview]
Message-ID: <20190930162551.GA31926@zn.tnic> (raw)
In-Reply-To: <1568787573-1297-3-git-send-email-TonyWWang-oc@zhaoxin.com>

On Wed, Sep 18, 2019 at 02:19:31PM +0800, 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 <TonyWWang-oc@zhaoxin.com>
> ---
>  arch/x86/kernel/cpu/mce/intel.c    | 6 +++---
>  arch/x86/kernel/cpu/mce/internal.h | 6 ++++++
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
> index 88cd959..70799a5 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;
>  
> diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h
> index 43031db..842b273 100644
> --- a/arch/x86/kernel/cpu/mce/internal.h
> +++ b/arch/x86/kernel/cpu/mce/internal.h
> @@ -45,11 +45,17 @@ unsigned long cmci_intel_adjust_timer(unsigned long interval);
>  bool mce_intel_cmci_poll(void);
>  void mce_intel_hcpu_update(unsigned long cpu);
>  void cmci_disable_bank(int bank);
> +void intel_init_cmci(void);
> +void intel_init_lmce(void);
> +void intel_clear_lmce(void);
>  #else
>  # define cmci_intel_adjust_timer mce_adjust_timer_default
>  static inline bool mce_intel_cmci_poll(void) { return false; }
>  static inline void mce_intel_hcpu_update(unsigned long cpu) { }
>  static inline void cmci_disable_bank(int bank) { }
> +static inline void intel_init_cmci(void) { }
> +static inline void intel_init_lmce(void) { }
> +static inline void intel_clear_lmce(void) { }
>  #endif
>  
>  void mce_timer_kick(unsigned long interval);
> -- 

I don't think you understood what I meant last time:

"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."

Anyway, I dropped this patch and exported the functions in the
respective patches where you use the functions.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  parent reply	other threads:[~2019-09-30 16:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  6:19 [PATCH v4 0/4] x86/mce: Add supports for Zhaoxin MCA Tony W Wang-oc
2019-09-18  6:19 ` [PATCH v4 1/4] x86/mce: Add Zhaoxin MCE support Tony W Wang-oc
2019-09-18  6:19   ` [PATCH v4 2/4] x86/mce: Make 3 functions non-static Tony W Wang-oc
2019-09-18  6:19     ` [PATCH v4 3/4] x86/mce: Add Zhaoxin CMCI support Tony W Wang-oc
2019-09-18  6:19       ` [PATCH v4 4/4] x86/mce: Add Zhaoxin LMCE support Tony W Wang-oc
2019-10-01 11:21         ` [tip: ras/core] " tip-bot2 for Tony W Wang-oc
2019-10-01 11:21       ` [tip: ras/core] x86/mce: Add Zhaoxin CMCI support tip-bot2 for Tony W Wang-oc
2019-09-30 16:25     ` Borislav Petkov [this message]
2019-10-01 11:21   ` [tip: ras/core] x86/mce: Add Zhaoxin MCE support tip-bot2 for Tony W Wang-oc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190930162551.GA31926@zn.tnic \
    --to=bp@alien8.de \
    --cc=CooperYan@zhaoxin.com \
    --cc=DavidWang@zhaoxin.com \
    --cc=HerryYang@zhaoxin.com \
    --cc=QiyuanWang@zhaoxin.com \
    --cc=TonyWWang-oc@zhaoxin.com \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vishal.l.verma@intel.com \
    --cc=x86@kernel.org \
    --cc=yazen.ghannam@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).