linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] lib/atomic64_test.c: convert printk(KERN_INFO to pr_info
@ 2014-06-02 16:16 Fabian Frederick
  0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2014-06-02 16:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Luca Barbieri, Andrew Morton

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: "

Cc: Luca Barbieri <luca@luca-barbieri.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 lib/atomic64_test.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
index 00bca22..0211d30 100644
--- a/lib/atomic64_test.c
+++ b/lib/atomic64_test.c
@@ -8,6 +8,9 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/bug.h>
 #include <linux/kernel.h>
@@ -146,18 +149,18 @@ static __init int test_atomic64(void)
 	BUG_ON(v.counter != r);
 
 #ifdef CONFIG_X86
-	printk(KERN_INFO "atomic64 test passed for %s platform %s CX8 and %s SSE\n",
+	pr_info("passed for %s platform %s CX8 and %s SSE\n",
 #ifdef CONFIG_X86_64
-	       "x86-64",
+		"x86-64",
 #elif defined(CONFIG_X86_CMPXCHG64)
-	       "i586+",
+		"i586+",
 #else
-	       "i386+",
+		"i386+",
 #endif
 	       boot_cpu_has(X86_FEATURE_CX8) ? "with" : "without",
 	       boot_cpu_has(X86_FEATURE_XMM) ? "with" : "without");
 #else
-	printk(KERN_INFO "atomic64 test passed\n");
+	pr_info("passed\n");
 #endif
 
 	return 0;
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-02 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 16:16 [PATCH 1/1] lib/atomic64_test.c: convert printk(KERN_INFO to pr_info Fabian Frederick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).