Skip to content

Commit 3bfaf95

Browse files
committed
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: Borislav Petkov <[email protected]> Cc: Tony Luck <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 21afaf1 commit 3bfaf95

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

arch/x86/kernel/cpu/mce/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* Author: Andi Kleen
99
*/
1010

11-
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12-
1311
#include <linux/thread_info.h>
1412
#include <linux/capability.h>
1513
#include <linux/miscdevice.h>

arch/x86/kernel/cpu/mce/dev-mcelog.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* Author: Andi Kleen
99
*/
1010

11-
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12-
1311
#include <linux/miscdevice.h>
1412
#include <linux/slab.h>
1513
#include <linux/kmod.h>

arch/x86/kernel/cpu/mce/internal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#ifndef __X86_MCE_INTERNAL_H__
33
#define __X86_MCE_INTERNAL_H__
44

5+
#undef pr_fmt
6+
#define pr_fmt(fmt) "mce: " fmt
7+
58
#include <linux/device.h>
69
#include <asm/mce.h>
710

arch/x86/kernel/cpu/mce/p5.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <asm/mce.h>
1515
#include <asm/msr.h>
1616

17+
#include "internal.h"
18+
1719
/* By default disabled */
1820
int mce_p5_enabled __read_mostly;
1921

arch/x86/kernel/cpu/mce/therm_throt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <asm/msr.h>
3131
#include <asm/trace/irq_vectors.h>
3232

33+
#include "internal.h"
34+
3335
/* How long to wait between reporting thermal events */
3436
#define CHECK_INTERVAL (300 * HZ)
3537

arch/x86/kernel/cpu/mce/threshold.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <asm/mce.h>
1111
#include <asm/trace/irq_vectors.h>
1212

13+
#include "internal.h"
14+
1315
static void default_threshold_interrupt(void)
1416
{
1517
pr_err("Unexpected threshold interrupt at vector %x\n",

arch/x86/kernel/cpu/mce/winchip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <asm/mce.h>
1414
#include <asm/msr.h>
1515

16+
#include "internal.h"
17+
1618
/* Machine check handler for WinChip C6: */
1719
static void winchip_machine_check(struct pt_regs *regs, long error_code)
1820
{

0 commit comments

Comments
 (0)