All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nandsim: use the existing output macros
@ 2016-06-12 10:18 Mathias Kresin
  2016-06-27 21:00 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Mathias Kresin @ 2016-06-12 10:18 UTC (permalink / raw)
  To: linux-mtd

Without using the output macros, it isn't possible to suppress these
messages on the console by specifying an appropriate console log level.

Signed-off-by: Mathias Kresin <dev@kresin.me>
---
 drivers/mtd/nand/nandsim.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 1eb9344..3cfcc5e 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -769,22 +769,22 @@ static int __init init_nandsim(struct mtd_info *mtd)
 	if (ns->busw == 16)
 		NS_WARN("16-bit flashes support wasn't tested\n");
 
-	printk("flash size: %llu MiB\n",
+	NS_INFO("flash size: %llu MiB\n",
 			(unsigned long long)ns->geom.totsz >> 20);
-	printk("page size: %u bytes\n",         ns->geom.pgsz);
-	printk("OOB area size: %u bytes\n",     ns->geom.oobsz);
-	printk("sector size: %u KiB\n",         ns->geom.secsz >> 10);
-	printk("pages number: %u\n",            ns->geom.pgnum);
-	printk("pages per sector: %u\n",        ns->geom.pgsec);
-	printk("bus width: %u\n",               ns->busw);
-	printk("bits in sector size: %u\n",     ns->geom.secshift);
-	printk("bits in page size: %u\n",       ns->geom.pgshift);
-	printk("bits in OOB size: %u\n",	ffs(ns->geom.oobsz) - 1);
-	printk("flash size with OOB: %llu KiB\n",
+	NS_INFO("page size: %u bytes\n",         ns->geom.pgsz);
+	NS_INFO("OOB area size: %u bytes\n",     ns->geom.oobsz);
+	NS_INFO("sector size: %u KiB\n",         ns->geom.secsz >> 10);
+	NS_INFO("pages number: %u\n",            ns->geom.pgnum);
+	NS_INFO("pages per sector: %u\n",        ns->geom.pgsec);
+	NS_INFO("bus width: %u\n",               ns->busw);
+	NS_INFO("bits in sector size: %u\n",     ns->geom.secshift);
+	NS_INFO("bits in page size: %u\n",       ns->geom.pgshift);
+	NS_INFO("bits in OOB size: %u\n",	ffs(ns->geom.oobsz) - 1);
+	NS_INFO("flash size with OOB: %llu KiB\n",
 			(unsigned long long)ns->geom.totszoob >> 10);
-	printk("page address bytes: %u\n",      ns->geom.pgaddrbytes);
-	printk("sector address bytes: %u\n",    ns->geom.secaddrbytes);
-	printk("options: %#x\n",                ns->options);
+	NS_INFO("page address bytes: %u\n",      ns->geom.pgaddrbytes);
+	NS_INFO("sector address bytes: %u\n",    ns->geom.secaddrbytes);
+	NS_INFO("options: %#x\n",                ns->options);
 
 	if ((ret = alloc_device(ns)) != 0)
 		return ret;
-- 
1.9.1

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

* Re: [PATCH] mtd: nandsim: use the existing output macros
  2016-06-12 10:18 [PATCH] mtd: nandsim: use the existing output macros Mathias Kresin
@ 2016-06-27 21:00 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2016-06-27 21:00 UTC (permalink / raw)
  To: Mathias Kresin; +Cc: linux-mtd

On Sun, Jun 12, 2016 at 12:18 PM, Mathias Kresin <dev@kresin.me> wrote:
> Without using the output macros, it isn't possible to suppress these
> messages on the console by specifying an appropriate console log level.
>
> Signed-off-by: Mathias Kresin <dev@kresin.me>
> ---
>  drivers/mtd/nand/nandsim.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
> index 1eb9344..3cfcc5e 100644
> --- a/drivers/mtd/nand/nandsim.c
> +++ b/drivers/mtd/nand/nandsim.c
> @@ -769,22 +769,22 @@ static int __init init_nandsim(struct mtd_info *mtd)
>         if (ns->busw == 16)
>                 NS_WARN("16-bit flashes support wasn't tested\n");
>
> -       printk("flash size: %llu MiB\n",
> +       NS_INFO("flash size: %llu MiB\n",
>                         (unsigned long long)ns->geom.totsz >> 20);
> -       printk("page size: %u bytes\n",         ns->geom.pgsz);
> -       printk("OOB area size: %u bytes\n",     ns->geom.oobsz);
> -       printk("sector size: %u KiB\n",         ns->geom.secsz >> 10);
> -       printk("pages number: %u\n",            ns->geom.pgnum);
> -       printk("pages per sector: %u\n",        ns->geom.pgsec);
> -       printk("bus width: %u\n",               ns->busw);
> -       printk("bits in sector size: %u\n",     ns->geom.secshift);
> -       printk("bits in page size: %u\n",       ns->geom.pgshift);
> -       printk("bits in OOB size: %u\n",        ffs(ns->geom.oobsz) - 1);
> -       printk("flash size with OOB: %llu KiB\n",
> +       NS_INFO("page size: %u bytes\n",         ns->geom.pgsz);
> +       NS_INFO("OOB area size: %u bytes\n",     ns->geom.oobsz);
> +       NS_INFO("sector size: %u KiB\n",         ns->geom.secsz >> 10);
> +       NS_INFO("pages number: %u\n",            ns->geom.pgnum);
> +       NS_INFO("pages per sector: %u\n",        ns->geom.pgsec);
> +       NS_INFO("bus width: %u\n",               ns->busw);
> +       NS_INFO("bits in sector size: %u\n",     ns->geom.secshift);
> +       NS_INFO("bits in page size: %u\n",       ns->geom.pgshift);
> +       NS_INFO("bits in OOB size: %u\n",       ffs(ns->geom.oobsz) - 1);
> +       NS_INFO("flash size with OOB: %llu KiB\n",
>                         (unsigned long long)ns->geom.totszoob >> 10);
> -       printk("page address bytes: %u\n",      ns->geom.pgaddrbytes);
> -       printk("sector address bytes: %u\n",    ns->geom.secaddrbytes);
> -       printk("options: %#x\n",                ns->options);
> +       NS_INFO("page address bytes: %u\n",      ns->geom.pgaddrbytes);
> +       NS_INFO("sector address bytes: %u\n",    ns->geom.secaddrbytes);
> +       NS_INFO("options: %#x\n",                ns->options);

Makes sense. I'll carry this since I'm doing a bigger nandsim facelift.

-- 
Thanks,
//richard

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

end of thread, other threads:[~2016-06-27 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12 10:18 [PATCH] mtd: nandsim: use the existing output macros Mathias Kresin
2016-06-27 21:00 ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.