All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Artem B. Bityuckiy" <dedekind@yandex.ru>
To: tglx@linutronix.de
Cc: MTD <linux-mtd@lists.infradead.org>
Subject: Re: [JFFS2] Cleanup the debugging stuff
Date: Sun, 17 Jul 2005 14:30:30 +0400	[thread overview]
Message-ID: <42DA3346.5010408@yandex.ru> (raw)
In-Reply-To: <1121595014.24449.220.camel@tglx.tec.linutronix.de>

Thomas Gleixner wrote:
> Why not ? I prefer a coherent cleanup over some halfarsed attempt.
> 	D1(printk(KERN_DEBUG "Scanned flash completely\n"));
> Whats wrong with 
> jffs2_dbg1_msg("Scanned flash completely\n"); ?
> 
> All those D1 messages should have KERN_DEBUG syslog level, so its simple
> to wrap them nicely.
... and sometimes one may need to print current->pid at the debugging 
messages prefix...
Well, if dwmw2 agrees with this, I may do this when I have time.

>-	D2(jffs2_dump_block_lists(c));
>+	D2(jffs2_dbg_dump_block_lists(c));
> 
> Why D2() here ? jffs2_dbg2_dump_block_lists(c) removes D2() and provides
> a quick association to the debug level.
> 
I decided to make "paranoia" checks checks independent on the debug 
level. I.e., one may enable JFFS2 "paranoia" check without enabling 
JFFS2 debugging messages - this is often useful.

In turn, "paranoia" functions use "dump" functions, for example:

jffs2_dbg_fragtree_paranoia_check() uses jffs2_dbg_dump_fragtree();
jffs2_dbg_prewrite_paranoia_check() uses jffs2_dbg_dump_buffer();
etc.

So, as "paranoia" functions do not depend on the debug level, "dump" 
functions should not depend on it as well. jffs2_dbg_dump_block_lists() 
is also a "dump" function and I did not make "a quick association" for 
it. It allows me to have debug level 0 and at the same "paranoia" checks 
enabled.

But for "paranoia" functions I made the "quick association", so no Dx() 
is needed when you call, say, jffs2_dbg_fragtree_paranoia_check().

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

  reply	other threads:[~2005-07-17 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-17 10:10 [JFFS2] Cleanup the debugging stuff Thomas Gleixner
2005-07-17 10:30 ` Artem B. Bityuckiy [this message]
2005-07-17 10:47   ` Thomas Gleixner
2005-07-17 10:51     ` Artem B. Bityuckiy

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=42DA3346.5010408@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tglx@linutronix.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.