All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] ubi: ubifs: Turn off verbose prints
Date: Mon, 11 Feb 2013 11:52:24 +0100	[thread overview]
Message-ID: <5118CD68.3000604@denx.de> (raw)
In-Reply-To: <1360354046-32392-3-git-send-email-joe.hershberger@ni.com>

On 02/08/2013 09:07 PM, Joe Hershberger wrote:
> The prints are out of control.  SILENCE!
> 
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
> ---
>  common/cmd_ubi.c      |  3 +++
>  drivers/mtd/mtdpart.c | 14 ++++++++------
>  drivers/mtd/ubi/ubi.h |  3 ++-
>  fs/ubifs/ubifs.h      |  2 +-
>  4 files changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
> index 01335dd..02b6b81 100644
> --- a/common/cmd_ubi.c
> +++ b/common/cmd_ubi.c
> @@ -23,6 +23,9 @@
>  #include <asm/errno.h>
>  #include <jffs2/load_kernel.h>
>  
> +#undef ubi_msg
> +#define ubi_msg(fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__)
> +
>  #define DEV_TYPE_NONE		0
>  #define DEV_TYPE_NAND		1
>  #define DEV_TYPE_ONENAND	2
> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
> index 96dcda2..2c60293 100644
> --- a/drivers/mtd/mtdpart.c
> +++ b/drivers/mtd/mtdpart.c
> @@ -347,16 +347,18 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
>  		if (mtd_mod_by_eb(cur_offset, master) != 0) {
>  			/* Round up to next erasesize */
>  			slave->offset = (mtd_div_by_eb(cur_offset, master) + 1) * master->erasesize;
> -			printk(KERN_NOTICE "Moving partition %d: "
> -			       "0x%012llx -> 0x%012llx\n", partno,
> -			       (unsigned long long)cur_offset, (unsigned long long)slave->offset);
> +			debug("Moving partition %d: 0x%012llx -> 0x%012llx\n",
> +				partno, (unsigned long long)cur_offset,
> +				(unsigned long long)slave->offset);
>  		}
>  	}
>  	if (slave->mtd.size == MTDPART_SIZ_FULL)
>  		slave->mtd.size = master->size - slave->offset;
>  
> -	printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n", (unsigned long long)slave->offset,
> -		(unsigned long long)(slave->offset + slave->mtd.size), slave->mtd.name);
> +	debug("0x%012llx-0x%012llx : \"%s\"\n",
> +		(unsigned long long)slave->offset,
> +		(unsigned long long)(slave->offset + slave->mtd.size),
> +		slave->mtd.name);
>  
>  	/* let's do some sanity checks */
>  	if (slave->offset >= master->size) {
> @@ -463,7 +465,7 @@ int add_mtd_partitions(struct mtd_info *master,
>  	if (mtd_partitions.next == NULL)
>  		INIT_LIST_HEAD(&mtd_partitions);
>  
> -	printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
> +	debug("Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);

Not so sure about this one. Other users might find this message quite
useful. Does this output really interfere with your UBI env handling?

>  	for (i = 0; i < nbparts; i++) {
>  		slave = add_one_partition(master, parts + i, i, cur_offset);
> diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
> index 14c3a5f..f4ed7d8 100644
> --- a/drivers/mtd/ubi/ubi.h
> +++ b/drivers/mtd/ubi/ubi.h
> @@ -59,7 +59,8 @@
>  #define UBI_NAME_STR "ubi"
>  
>  /* Normal UBI messages */
> -#define ubi_msg(fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__)
> +#define ubi_msg(fmt, ...) /*printk(KERN_NOTICE "UBI: " fmt "\n", \
> +				##__VA_ARGS__)*/

Hmmm....

>  /* UBI warning messages */
>  #define ubi_warn(fmt, ...) printk(KERN_WARNING "UBI warning: %s: " fmt "\n", \
>  				  __func__, ##__VA_ARGS__)
> diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
> index 0af471a..4ab1cbd 100644
> --- a/fs/ubifs/ubifs.h
> +++ b/fs/ubifs/ubifs.h
> @@ -464,7 +464,7 @@ static inline ino_t parent_ino(struct dentry *dentry)
>  
>  /* Normal UBIFS messages */
>  #define ubifs_msg(fmt, ...) \
> -		printk(KERN_NOTICE "UBIFS: " fmt "\n", ##__VA_ARGS__)
> +		/*printk(KERN_NOTICE "UBIFS: " fmt "\n", ##__VA_ARGS__)*/

... Not sure again about this silencing. And these "removed" printk's
are really ugly.

Could you please give an example of UBI usage (message logs from "ubi
create ..., ubi part ..., ubi read ...") without this patch (or complete
patchset) and with it? So that we see the real difference?

Thanks,
Stefan

  reply	other threads:[~2013-02-11 10:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 20:07 [U-Boot] [PATCH 0/5] Add support for using an UBI volume for environment Joe Hershberger
2013-02-08 20:07 ` [U-Boot] [PATCH 1/5] ubi: Expose a few simple functions from the cmd_ubi Joe Hershberger
2013-02-11 10:45   ` Stefan Roese
2013-02-08 20:07 ` [U-Boot] [PATCH 2/5] ubi: ubifs: Turn off verbose prints Joe Hershberger
2013-02-11 10:52   ` Stefan Roese [this message]
2013-03-20 10:07     ` Joe Hershberger
2013-03-20 10:14       ` Stefan Roese
2013-03-20 10:19         ` Joe Hershberger
2013-03-20 13:11           ` Tom Rini
2013-02-08 20:07 ` [U-Boot] [PATCH 3/5] mtd: Make mtdparts work with pre-reloc env Joe Hershberger
2013-02-11 10:53   ` Stefan Roese
2013-02-08 20:07 ` [U-Boot] [PATCH 4/5] env: Add support for UBI environment Joe Hershberger
2013-02-11 10:54   ` Stefan Roese
2013-02-08 20:07 ` [U-Boot] [PATCH 5/5] env: Add redundant env support to UBI env Joe Hershberger
2013-02-11 11:00   ` Stefan Roese
2013-02-11 10:39 ` [U-Boot] [PATCH 0/5] Add support for using an UBI volume for environment Stefan Roese
2013-02-12  2:37 ` Scott Wood
2013-02-12 16:04   ` Tom Rini
2013-02-12 18:10     ` Scott Wood
2013-02-18 18:27 ` Tom Rini
2013-03-26 21:53 ` [U-Boot] [PATCH v2 0/6] " Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 1/6] ubi: Fix broken cleanup code in attach_by_scanning Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 2/6] ubi: Expose a few simple functions from the cmd_ubi Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 3/6] ubi: ubifs: Turn off verbose prints Joe Hershberger
2013-04-02 10:46     ` Stefan Roese
2013-04-02 18:25       ` Tom Rini
2013-03-26 21:53   ` [U-Boot] [PATCH v2 4/6] mtd: Make mtdparts work with pre-reloc env Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 5/6] env: Add support for UBI environment Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 6/6] env: Add redundant env support to UBI env Joe Hershberger
2013-04-08 20:32   ` [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 1/7] ubi: Fix broken cleanup code in attach_by_scanning Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 2/7] ubi: Expose a few simple functions from the cmd_ubi Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 3/7] ubi: ubifs: Add documentation for README Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 4/7] ubi: ubifs: Turn off verbose prints Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 5/7] mtd: Make mtdparts work with pre-reloc env Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 6/7] env: Add support for UBI environment Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 7/7] env: Add redundant env support to UBI env Joe Hershberger
2013-04-11 22:26     ` [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment Tom Rini
2013-04-12  6:19       ` Stefan Roese
2013-04-12 11:30         ` Tom Rini
2013-04-12 12:52           ` Joe Hershberger
2013-04-12 14:14             ` Stefan Roese

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=5118CD68.3000604@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.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 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.