mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Joe Perches <joe@perches.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	joe@perches.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:tracing/core] testmmiotrace.c: Add and use pr_fmt(fmt)
Date: Mon, 12 Oct 2009 06:10:56 GMT	[thread overview]
Message-ID: <tip-3c355863fb32070a2800f41106519c5c3038623a@git.kernel.org> (raw)
In-Reply-To: <3bb66cc7f85f77b9416902e1be7076f7e3f4ad48.1254701151.git.joe@perches.com>

Commit-ID:  3c355863fb32070a2800f41106519c5c3038623a
Gitweb:     http://git.kernel.org/tip/3c355863fb32070a2800f41106519c5c3038623a
Author:     Joe Perches <joe@perches.com>
AuthorDate: Sun, 4 Oct 2009 17:53:40 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 12 Oct 2009 08:05:41 +0200

testmmiotrace.c: Add and use pr_fmt(fmt)

- Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt.
- Strip MODULE_NAME from pr_<level>s.
- Remove MODULE_NAME definition.

Signed-off-by: Joe Perches <joe@perches.com>
LKML-Reference: <3bb66cc7f85f77b9416902e1be7076f7e3f4ad48.1254701151.git.joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/mm/testmmiotrace.c |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/arch/x86/mm/testmmiotrace.c b/arch/x86/mm/testmmiotrace.c
index 427fd1b..8565d94 100644
--- a/arch/x86/mm/testmmiotrace.c
+++ b/arch/x86/mm/testmmiotrace.c
@@ -1,12 +1,13 @@
 /*
  * Written by Pekka Paalanen, 2008-2009 <pq@iki.fi>
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/mmiotrace.h>
 
-#define MODULE_NAME "testmmiotrace"
-
 static unsigned long mmio_address;
 module_param(mmio_address, ulong, 0);
 MODULE_PARM_DESC(mmio_address, " Start address of the mapping of 16 kB "
@@ -30,7 +31,7 @@ static unsigned v32(unsigned i)
 static void do_write_test(void __iomem *p)
 {
 	unsigned int i;
-	pr_info(MODULE_NAME ": write test.\n");
+	pr_info("write test.\n");
 	mmiotrace_printk("Write test.\n");
 
 	for (i = 0; i < 256; i++)
@@ -47,7 +48,7 @@ static void do_read_test(void __iomem *p)
 {
 	unsigned int i;
 	unsigned errs[3] = { 0 };
-	pr_info(MODULE_NAME ": read test.\n");
+	pr_info("read test.\n");
 	mmiotrace_printk("Read test.\n");
 
 	for (i = 0; i < 256; i++)
@@ -68,7 +69,7 @@ static void do_read_test(void __iomem *p)
 
 static void do_read_far_test(void __iomem *p)
 {
-	pr_info(MODULE_NAME ": read far test.\n");
+	pr_info("read far test.\n");
 	mmiotrace_printk("Read far test.\n");
 
 	ioread32(p + read_far);
@@ -78,7 +79,7 @@ static void do_test(unsigned long size)
 {
 	void __iomem *p = ioremap_nocache(mmio_address, size);
 	if (!p) {
-		pr_err(MODULE_NAME ": could not ioremap, aborting.\n");
+		pr_err("could not ioremap, aborting.\n");
 		return;
 	}
 	mmiotrace_printk("ioremap returned %p.\n", p);
@@ -94,24 +95,22 @@ static int __init init(void)
 	unsigned long size = (read_far) ? (8 << 20) : (16 << 10);
 
 	if (mmio_address == 0) {
-		pr_err(MODULE_NAME ": you have to use the module argument "
-							"mmio_address.\n");
-		pr_err(MODULE_NAME ": DO NOT LOAD THIS MODULE UNLESS"
-				" YOU REALLY KNOW WHAT YOU ARE DOING!\n");
+		pr_err("you have to use the module argument mmio_address.\n");
+		pr_err("DO NOT LOAD THIS MODULE UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!\n");
 		return -ENXIO;
 	}
 
-	pr_warning(MODULE_NAME ": WARNING: mapping %lu kB @ 0x%08lx in PCI "
-		"address space, and writing 16 kB of rubbish in there.\n",
-		 size >> 10, mmio_address);
+	pr_warning("WARNING: mapping %lu kB @ 0x%08lx in PCI address space, "
+		   "and writing 16 kB of rubbish in there.\n",
+		   size >> 10, mmio_address);
 	do_test(size);
-	pr_info(MODULE_NAME ": All done.\n");
+	pr_info("All done.\n");
 	return 0;
 }
 
 static void __exit cleanup(void)
 {
-	pr_debug(MODULE_NAME ": unloaded.\n");
+	pr_debug("unloaded.\n");
 }
 
 module_init(init);

  reply	other threads:[~2009-10-12  6:12 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-05  1:18 [PATCH 00/21] pr_dbg, pr_fmt Joe Perches
2009-10-05  0:53 ` [PATCH 01/21] include/linux/ dynamic_debug.h kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug, add pr_dbg Joe Perches
2009-10-05  0:53 ` [PATCH 02/21] ftrace.c: Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Joe Perches
2009-10-05 13:10   ` Steven Rostedt
2009-10-05 17:21     ` Joe Perches
2009-10-05 17:32       ` Steven Rostedt
2009-10-12  6:10   ` [tip:tracing/core] " tip-bot for Joe Perches
2009-10-05  0:53 ` [PATCH 03/21] mtrr: use pr_<level> and pr_fmt Joe Perches
2009-10-05  0:53 ` [PATCH 04/21] microcode: use pr_<level> and add pr_fmt Joe Perches
2009-10-05  0:53 ` [PATCH 05/21] amd_iommu.c: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-10-12 15:00   ` Joerg Roedel
2009-10-12 17:00     ` Joe Perches
2009-10-05  0:53 ` [PATCH 06/21] es7000_32.c: " Joe Perches
2009-10-05  0:53 ` [PATCH 07/21] arch/x86/kernel/apic/: " Joe Perches
2009-10-05  0:53 ` [PATCH 08/21] mcheck/: " Joe Perches
2009-10-05  0:53 ` [PATCH 09/21] arch/x86/kernel/setup_percpu.c: " Joe Perches
2009-10-05  0:53 ` [PATCH 10/21] arch/x86/kernel/cpu/: " Joe Perches
2009-10-05  0:53 ` [PATCH 11/21] i8254.c: Add pr_fmt(fmt) Joe Perches
2009-10-05  0:53 ` [PATCH 12/21] kmmio.c: Add and use pr_fmt(fmt) Joe Perches
2009-10-05  0:53 ` [PATCH 13/21] testmmiotrace.c: " Joe Perches
2009-10-12  6:10   ` tip-bot for Joe Perches [this message]
2009-10-05  0:53 ` [PATCH 14/21] crypto/: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-10-05  0:53 ` [PATCH 15/21] kernel/power/: " Joe Perches
2009-10-05 19:43   ` Rafael J. Wysocki
2009-10-05 20:31     ` Joe Perches
2009-10-05 22:37       ` Rafael J. Wysocki
2009-10-09  3:53         ` Joe Perches
2009-10-10 21:28           ` Rafael J. Wysocki
2009-10-11  1:49             ` Joe Perches
2009-10-11  8:59             ` Pavel Machek
2009-10-05  0:53 ` [PATCH 16/21] kernel/kexec.c: " Joe Perches
2009-10-05 12:01   ` Eric W. Biederman
2009-10-05 17:57     ` Joe Perches
2009-10-05  0:53 ` [PATCH 17/21] crypto/async_tx/raid6test.c: " Joe Perches
2009-10-05  0:53 ` [PATCH 18/21] arch/x86/mm/mmio-mod.c: use pr_fmt Joe Perches
2009-10-05  0:53 ` [PATCH 19/21] drivers/net/bonding/: : " Joe Perches
2009-10-05  7:12   ` David Miller
2009-10-05  0:53 ` [PATCH 20/21] drivers/net/tlan: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-10-05  7:12   ` David Miller
2009-10-05  0:53 ` [PATCH 21/21] drivers/net/tlan.h: Convert printk(KERN_DEBUG to pr_dbg( Joe Perches
2009-10-05  7:12   ` David Miller
2009-10-05  7:16     ` Joe Perches
2009-10-05  7:20       ` David Miller
2009-10-05 21:15       ` Rafael J. Wysocki
2009-10-05 21:28         ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-3c355863fb32070a2800f41106519c5c3038623a@git.kernel.org \
    --to=joe@perches.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome