Skip to content

Commit b3b16d2

Browse files
Fabian Fredericktorvalds
Fabian Frederick
authored andcommitted
lib/atomic64_test.c: convert printk(KERN_INFO to pr_info
Convert printk to current pr_foo() logging functions. Also add pr_fmt based on KBUILD_MODNAME to avoid repeating prefix. Prefix is now "atomic64_test: " Signed-off-by: Fabian Frederick <[email protected]> Cc: Luca Barbieri <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c56ba70 commit b3b16d2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/atomic64_test.c

+8-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
* the Free Software Foundation; either version 2 of the License, or
99
* (at your option) any later version.
1010
*/
11+
12+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13+
1114
#include <linux/init.h>
1215
#include <linux/bug.h>
1316
#include <linux/kernel.h>
@@ -146,18 +149,18 @@ static __init int test_atomic64(void)
146149
BUG_ON(v.counter != r);
147150

148151
#ifdef CONFIG_X86
149-
printk(KERN_INFO "atomic64 test passed for %s platform %s CX8 and %s SSE\n",
152+
pr_info("passed for %s platform %s CX8 and %s SSE\n",
150153
#ifdef CONFIG_X86_64
151-
"x86-64",
154+
"x86-64",
152155
#elif defined(CONFIG_X86_CMPXCHG64)
153-
"i586+",
156+
"i586+",
154157
#else
155-
"i386+",
158+
"i386+",
156159
#endif
157160
boot_cpu_has(X86_FEATURE_CX8) ? "with" : "without",
158161
boot_cpu_has(X86_FEATURE_XMM) ? "with" : "without");
159162
#else
160-
printk(KERN_INFO "atomic64 test passed\n");
163+
pr_info("passed\n");
161164
#endif
162165

163166
return 0;

0 commit comments

Comments
 (0)