Skip to contentSkip to conversation

mtd: gpmi-nand: Improve logging style

PATCH Applied Fabio Estevam 3 participants 3 messages Sep 5, 2012 – Sep 22, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: gpmi-nand: Improve logging style

From: Fabio Estevam <[email protected]>

Improve logging style by prefixing the pr_ messages with "gpmi_nand".

---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +6 -3
index c46be6c..9493507 100644
@@ -18,6 +18,9 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/clk.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
@@ -114,7 +117,7 @@ int common_nfc_set_geometry(struct gpmi_nand_data *this)
 	/* We use the same ECC strength for all chunks. */
 	geo->ecc_strength = get_ecc_strength(this);
 	if (!geo->ecc_strength) {
-		pr_err("We get a wrong ECC strength.\n");
+		pr_err("wrong ECC strength.\n");
 		return -EINVAL;
 	}
 
@@ -1685,9 +1688,9 @@ static int __init gpmi_nand_init(void)
 
 	err = platform_driver_register(&gpmi_nand_driver);
 	if (err == 0)
-		printk(KERN_INFO "GPMI NAND driver registered. (IMX)\n");
+		pr_info("driver registered.\n");
 	else
-		pr_err("i.MX GPMI NAND driver registration failed\n");
+		pr_err("driver registration failed.\n");
 	return err;
 }
 
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 34 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Improve logging style by prefixing the pr_ messages with "gpmi_nand".

---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +4 -1
index c46be6c..9493507 100644
@@ -18,6 +18,9 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/clk.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
@@ -114,7 +117,7 @@ int common_nfc_set_geometry(struct gpmi_nand_data *this)
 	/* We use the same ECC strength for all chunks. */
 	geo->ecc_strength = get_ecc_strength(this);
 	if (!geo->ecc_strength) {
-		pr_err("We get a wrong ECC strength.\n");
+		pr_err("wrong ECC strength.\n");
 		return -EINVAL;
 	}
 
@@ -1685,9 +1688,9 @@ static int __init gpmi_nand_init(void)
 

drivers/mtd/nand/gpmi-nand/gpmi-nand.c static int __init gpmi_nand_init(void) · line 1696

Quoted 10 lines
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +2 -2
 	err = platform_driver_register(&gpmi_nand_driver);
 	if (err == 0)
-		printk(KERN_INFO "GPMI NAND driver registered. (IMX)\n");
+		pr_info("driver registered.\n");
 	else
-		pr_err("i.MX GPMI NAND driver registration failed\n");
+		pr_err("driver registration failed.\n");
 	return err;
 }
 

thanks.

Huang Shijie