[patch 2.6.29-rc3] NAND: fix broken debug messages
David Brownell
david-b at pacbell.net
Tue Feb 3 11:38:38 EST 2009
On Tuesday 03 February 2009, Geert Uytterhoeven wrote:
> > >- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
> > >+ DEBUG(MTD_DEBUG_LEVEL0, "do_nand_write_oob: "
> >
> > This is wrong too. The function is called 'nand_do_write_oob'.
That's what happens sometimes when you edit patches by hand.
Originally I just changed "read" to "write", then I noticed
there was "do" in there ... obviously, it got inserted in
the wrong place. ;)
> > Which leads me to wonder why we aren't doing something like:
> >
> > DEBUG(MTD_DEBUG_LEVEL0, "%s: <message>\n", __func__);
That would be sensible.
> Or use
>
> #define pr_fmt(fmt) "%s: " fmt, __func__
>
> at the top of the file, and start using the official pr_*() routines?
Yeah, DEBUG should be treated globally as a reserved
symbol. Ever notice how dev_dbg() misbhaves in MTD
code? Ditto pr_dbg(), but that's rarely the right thing
to use when there's a device node in hand. Yeech.
"Now" (i.e. after rc1 and well before rc-last) would
be a good time to send a big patch changing all the
debug messaging to something less aggressively counter
to the core debug messaging convention of Linux...
- Dave
More information about the linux-mtd
mailing list