diff mbox series

x86/mce/amd: fix -Wmissing-prototypes warnings

Message ID 1571817437-7570-1-git-send-email-wang.yi59@zte.com.cn (mailing list archive)
State New, archived
Headers show
Series x86/mce/amd: fix -Wmissing-prototypes warnings | expand

Commit Message

Yi Wang Oct. 23, 2019, 7:57 a.m. UTC
We get two warnings when build kernel W=1:
arch/x86/kernel/cpu/mce/amd.c:586:6: warning: no previous prototype for ‘disable_err_thresholding’ [-Wmissing-prototypes]

Make the function static to fix this.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
 arch/x86/kernel/cpu/mce/amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Borislav Petkov Oct. 23, 2019, 8:07 a.m. UTC | #1
On Wed, Oct 23, 2019 at 03:57:17PM +0800, Yi Wang wrote:
> We get two warnings when build kernel W=1:
> arch/x86/kernel/cpu/mce/amd.c:586:6: warning: no previous prototype for ‘disable_err_thresholding’ [-Wmissing-prototypes]
> 
> Make the function static to fix this.
> 
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
>  arch/x86/kernel/cpu/mce/amd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
> index 6ea7fdc..5167bd2 100644
> --- a/arch/x86/kernel/cpu/mce/amd.c
> +++ b/arch/x86/kernel/cpu/mce/amd.c
> @@ -583,7 +583,7 @@ bool amd_filter_mce(struct mce *m)
>   * - Prevent possible spurious interrupts from the IF bank on Family 0x17
>   *   Models 0x10-0x2F due to Erratum #1114.
>   */
> -void disable_err_thresholding(struct cpuinfo_x86 *c, unsigned int bank)
> +static void disable_err_thresholding(struct cpuinfo_x86 *c, unsigned int bank)
>  {
>  	int i, num_msrs;
>  	u64 hwcr;
> --

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=ras/core&id=47cd84e98f512eac5aad988f08baff432aea35ba
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index 6ea7fdc..5167bd2 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -583,7 +583,7 @@  bool amd_filter_mce(struct mce *m)
  * - Prevent possible spurious interrupts from the IF bank on Family 0x17
  *   Models 0x10-0x2F due to Erratum #1114.
  */
-void disable_err_thresholding(struct cpuinfo_x86 *c, unsigned int bank)
+static void disable_err_thresholding(struct cpuinfo_x86 *c, unsigned int bank)
 {
 	int i, num_msrs;
 	u64 hwcr;