linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: gpmi-nand: Improve logging style
@ 2012-09-05 13:27 Fabio Estevam
  2012-09-06  2:12 ` Huang Shijie
  2012-09-22 14:58 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2012-09-05 13:27 UTC (permalink / raw)
  To: artem.bityutskiy; +Cc: marex, b32955, linux-mtd, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

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

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index c46be6c..9493507 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -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;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: gpmi-nand: Improve logging style
  2012-09-05 13:27 [PATCH] mtd: gpmi-nand: Improve logging style Fabio Estevam
@ 2012-09-06  2:12 ` Huang Shijie
  2012-09-22 14:58 ` Artem Bityutskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Huang Shijie @ 2012-09-06  2:12 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: marex, artem.bityutskiy, linux-mtd, Fabio Estevam

于 2012年09月05日 21:27, Fabio Estevam 写道:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Improve logging style by prefixing the pr_ messages with "gpmi_nand".
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index c46be6c..9493507 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -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;
>  }
>  
thanks.

Acked-by: Huang Shijie <b32955@freescale.com>

Huang Shijie

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: gpmi-nand: Improve logging style
  2012-09-05 13:27 [PATCH] mtd: gpmi-nand: Improve logging style Fabio Estevam
  2012-09-06  2:12 ` Huang Shijie
@ 2012-09-22 14:58 ` Artem Bityutskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2012-09-22 14:58 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: marex, artem.bityutskiy, linux-mtd, Fabio Estevam, b32955

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

On Wed, 2012-09-05 at 10:27 -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Improve logging style by prefixing the pr_ messages with "gpmi_nand".
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-22 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 13:27 [PATCH] mtd: gpmi-nand: Improve logging style Fabio Estevam
2012-09-06  2:12 ` Huang Shijie
2012-09-22 14:58 ` Artem Bityutskiy

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).