summaryrefslogtreecommitdiff
path: root/arch/m68k/kernel/module.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2016-12-06 19:57:37 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2017-02-12 10:36:52 +0100
commit7c79e1eef8c9a723e589364643c7e74b688e23bf (patch)
tree14dbba3ffb10615785668fdc988bf538cd8683e5 /arch/m68k/kernel/module.c
parent4eee1e72ad06bdc942b8f8c221d49691ef232c56 (diff)
m68k/kernel: Modernize printing of kernel messages
- Use pr_err_ratelimited() instead of deprecated printk_ratelimit(), - Add dummies for validating format strings when debugging is disabled, - Convert from printk() to pr_*(), - Correct printf()-style format specifiers. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/kernel/module.c')
-rw-r--r--arch/m68k/kernel/module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/m68k/kernel/module.c b/arch/m68k/kernel/module.c
index eb46fd6038ca..aaac2da318ff 100644
--- a/arch/m68k/kernel/module.c
+++ b/arch/m68k/kernel/module.c
@@ -12,9 +12,9 @@
#include <linux/kernel.h>
#if 0
-#define DEBUGP printk
+#define DEBUGP(fmt, ...) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
-#define DEBUGP(fmt...)
+#define DEBUGP(fmt, ...) no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif
#ifdef CONFIG_MODULES
@@ -51,8 +51,8 @@ int apply_relocate(Elf32_Shdr *sechdrs,
*location += sym->st_value - (uint32_t)location;
break;
default:
- printk(KERN_ERR "module %s: Unknown relocation: %u\n",
- me->name, ELF32_R_TYPE(rel[i].r_info));
+ pr_err("module %s: Unknown relocation: %u\n", me->name,
+ ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC;
}
}
@@ -91,8 +91,8 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
*location = rel[i].r_addend + sym->st_value - (uint32_t)location;
break;
default:
- printk(KERN_ERR "module %s: Unknown relocation: %u\n",
- me->name, ELF32_R_TYPE(rel[i].r_info));
+ pr_err("module %s: Unknown relocation: %u\n", me->name,
+ ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC;
}
}