Commit 3bfaf95c authored by Borislav Petkov's avatar Borislav Petkov

x86/mce: Unify pr_* prefix

Move the pr_fmt prefix to internal.h and include it everywhere. This
way, all pr_* printed strings will be prepended with "mce: ".

No functional changes.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20181205200913.GR29510@zn.tnic
parent 21afaf18
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
* Author: Andi Kleen * Author: Andi Kleen
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
* Author: Andi Kleen * Author: Andi Kleen
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/kmod.h> #include <linux/kmod.h>
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#ifndef __X86_MCE_INTERNAL_H__ #ifndef __X86_MCE_INTERNAL_H__
#define __X86_MCE_INTERNAL_H__ #define __X86_MCE_INTERNAL_H__
#undef pr_fmt
#define pr_fmt(fmt) "mce: " fmt
#include <linux/device.h> #include <linux/device.h>
#include <asm/mce.h> #include <asm/mce.h>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/msr.h> #include <asm/msr.h>
#include "internal.h"
/* By default disabled */ /* By default disabled */
int mce_p5_enabled __read_mostly; int mce_p5_enabled __read_mostly;
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/trace/irq_vectors.h> #include <asm/trace/irq_vectors.h>
#include "internal.h"
/* How long to wait between reporting thermal events */ /* How long to wait between reporting thermal events */
#define CHECK_INTERVAL (300 * HZ) #define CHECK_INTERVAL (300 * HZ)
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/trace/irq_vectors.h> #include <asm/trace/irq_vectors.h>
#include "internal.h"
static void default_threshold_interrupt(void) static void default_threshold_interrupt(void)
{ {
pr_err("Unexpected threshold interrupt at vector %x\n", pr_err("Unexpected threshold interrupt at vector %x\n",
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/msr.h> #include <asm/msr.h>
#include "internal.h"
/* Machine check handler for WinChip C6: */ /* Machine check handler for WinChip C6: */
static void winchip_machine_check(struct pt_regs *regs, long error_code) static void winchip_machine_check(struct pt_regs *regs, long error_code)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment