Skip to content

Commit f0b914a

Browse files
committed
m68k/include: Modernize printing of kernel messages
- Convert from printk() to pr_*(), - Add dummies for validating format strings when debugging is disabled. Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent e699113 commit f0b914a

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

arch/m68k/include/asm/bug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
#ifdef CONFIG_DEBUG_BUGVERBOSE
77
#ifndef CONFIG_SUN3
88
#define BUG() do { \
9-
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
9+
pr_crit("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
1010
__builtin_trap(); \
1111
} while (0)
1212
#else
1313
#define BUG() do { \
14-
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
14+
pr_crit("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
1515
panic("BUG!"); \
1616
} while (0)
1717
#endif

arch/m68k/include/asm/floppy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ asmlinkage irqreturn_t floppy_hardint(int irq, void *dev_id)
234234
virtual_dma_residue += virtual_dma_count;
235235
virtual_dma_count=0;
236236
#ifdef TRACE_FLPY_INT
237-
printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
238-
virtual_dma_count, virtual_dma_residue, calls, bytes,
239-
dma_wait);
237+
pr_info("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
238+
virtual_dma_count, virtual_dma_residue, calls, bytes,
239+
dma_wait);
240240
calls = 0;
241241
dma_wait=0;
242242
#endif

arch/m68k/include/asm/math-emu.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@ struct fp_data {
105105
#ifdef FPU_EMU_DEBUG
106106
extern unsigned int fp_debugprint;
107107

108-
#define dprint(bit, fmt, args...) ({ \
108+
#define dprint(bit, fmt, ...) ({ \
109109
if (fp_debugprint & (1 << (bit))) \
110-
printk(fmt, ## args); \
110+
pr_info(fmt, ##__VA_ARGS__); \
111111
})
112112
#else
113-
#define dprint(bit, fmt, args...)
113+
#define dprint(bit, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
114114
#endif
115115

116116
#define uprint(str) ({ \
117117
static int __count = 3; \
118118
\
119119
if (__count > 0) { \
120-
printk("You just hit an unimplemented " \
120+
pr_err("You just hit an unimplemented " \
121121
"fpu instruction (%s)\n", str); \
122-
printk("Please report this to ....\n"); \
122+
pr_err("Please report this to ....\n"); \
123123
__count--; \
124124
} \
125125
})

0 commit comments

Comments
 (0)