From: Thomas Gleixner <tglx@linutronix.de>
To: "Artem B. Bityuckiy" <dedekind@yandex.ru>
Cc: MTD <linux-mtd@lists.infradead.org>
Subject: Re: [JFFS2] Cleanup the debugging stuff
Date: Sun, 17 Jul 2005 12:47:16 +0200 [thread overview]
Message-ID: <1121597237.24449.231.camel@tglx.tec.linutronix.de> (raw)
In-Reply-To: <42DA3346.5010408@yandex.ru>
On Sun, 2005-07-17 at 14:30 +0400, Artem B. Bityuckiy wrote:
> > 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...
? jffs2_dgb1_msg("Bla: %d. Message\n", current->pid);
> 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().
Remove all the Dx() crap or none. This is more mess than before. You can
achieve all this by defining the macros correct
#if DBGLEVEL > 1
#define jffs2_dbg2_dump_whatever jff2_dbg_dmp_whatever
#else
#define jffs2_dbg2_dump_whatever do {} while(0)
#endif
#if DBGLEVEL > 1 || PARANOIA > 0
extern void jffs2_dbg_dump_whatever(arg);
#else
#define jffs2_dbg_dump_whatever do {} while(0)
#endif
tglx
next prev parent reply other threads:[~2005-07-17 10:43 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
2005-07-17 10:47 ` Thomas Gleixner [this message]
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=1121597237.24449.231.camel@tglx.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=dedekind@yandex.ru \
--cc=linux-mtd@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox