linux-mips
[Top] [All Lists]

[PATCH 3/7] MTD: MAPS: bcm963xx-flash: clean up printk usage

To: linux-mtd@lists.infradead.org
Subject: [PATCH 3/7] MTD: MAPS: bcm963xx-flash: clean up printk usage
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Mon, 5 Dec 2011 16:08:07 +0100
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, Florian Fainelli <florian@openwrt.org>, David Woodhouse <dwmw2@infradead.org>, Artem Bityutskiy <Artem.Bityutskiy@intel.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=HH9j5+lJqJszAGboUKgVhkLh3HTQd8A5c//Nug/l3mI=; b=EgYIrTG3ZcWC2HBGKDeTtd8PRbh/pZ+2l5TqdH17FAhkplB21zJaMZd1JOUw9ydjHe 54+fItnSjoAr/ybsa9kfw44HbKyMFG01iZ4dv0qgvvE00T3MYfitAAInkJykDB9jzn6H PhtHiAB+oP7R2Ck82Jj9uPO5PGSZ1qS+uT44Y=
In-reply-to: <1323097691-16414-1-git-send-email-jonas.gorski@gmail.com>
References: <1323097691-16414-1-git-send-email-jonas.gorski@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Replace raw printk's with their pr_XXX equivalent and unify broken up
strings so they become grepable.

Also replace the PFX definition with a pr_fmt().

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/mtd/maps/bcm963xx-flash.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/maps/bcm963xx-flash.c 
b/drivers/mtd/maps/bcm963xx-flash.c
index 58cbaf2..ce2ca2a 100644
--- a/drivers/mtd/maps/bcm963xx-flash.c
+++ b/drivers/mtd/maps/bcm963xx-flash.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
@@ -33,8 +35,6 @@
 #define BCM63XX_BUSWIDTH       2               /* Buswidth */
 #define BCM63XX_EXTENDED_SIZE  0xBFC00000      /* Extended flash address */
 
-#define PFX KBUILD_MODNAME ": "
-
 static struct mtd_partition *parsed_parts;
 
 static struct mtd_info *bcm963xx_mtd_info;
@@ -79,8 +79,8 @@ static int parse_cfe_partitions(struct mtd_info *master,
        tagversion = &(buf->tag_version[0]);
        boardid = &(buf->board_id[0]);
 
-       printk(KERN_INFO PFX "CFE boot tag found with version %s "
-                               "and board type %s\n", tagversion, boardid);
+       pr_info("CFE boot tag found with version %s and board type %s\n",
+               tagversion, boardid);
 
        kerneladdr = kerneladdr - BCM63XX_EXTENDED_SIZE;
        rootfsaddr = kerneladdr + kernellen;
@@ -139,13 +139,13 @@ static int parse_cfe_partitions(struct mtd_info *master,
        parts[curpart].size = master->size - parts[0].size - parts[3].size;
 
        for (i = 0; i < nrparts; i++)
-               printk(KERN_INFO PFX "Partition %d is %s offset %lx and "
-                                       "length %lx\n", i, parts[i].name,
-                                       (long unsigned int)(parts[i].offset),
-                                       (long unsigned int)(parts[i].size));
+               pr_info("Partition %d is %s offset %lx and length %lx\n", i,
+                       parts[i].name, (long unsigned int)(parts[i].offset),
+                       (long unsigned int)(parts[i].size));
+
+       pr_info("Spare partition is offset %x and length %x\n", spareaddr,
+               sparelen);
 
-       printk(KERN_INFO PFX "Spare partition is offset %x and length %x\n",
-                                                       spareaddr, sparelen);
        *pparts = parts;
        vfree(buf);
 
-- 
1.7.2.5


<Prev in Thread] Current Thread [Next in Thread>