linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Ferenc Wagner <wferi@niif.hu>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: CONFIG_MTD_DEBUG vs generic DEBUG support in kernel.h
Date: Thu, 08 Apr 2010 11:06:20 +0300	[thread overview]
Message-ID: <1270713980.6754.94.camel@localhost> (raw)
In-Reply-To: <87vdctzjn4.fsf@tac.ki.iif.hu>

On Thu, 2010-03-18 at 17:20 +0100, Ferenc Wagner wrote:
> Artem Bityutskiy <dedekind1@gmail.com> writes:
> 
> > On Tue, 2010-03-16 at 13:55 +0100, Ferenc Wagner wrote:
> > 
> >> include/linux/mtd/mtd.h contains the following snippet:
> >> 
> >> #ifdef CONFIG_MTD_DEBUG
> >> #define DEBUG(n, args...)                               \
> >>         do {                                            \
> >>                 if (n <= CONFIG_MTD_DEBUG_VERBOSE)      \
> >>                         printk(KERN_INFO args);         \
> >>         } while(0)
> >> 
> >> which conflicts with the generic debugging support in
> >> include/linux/kernel.h:
> >> 
> >> #ifdef DEBUG
> >> #define pr_devel(fmt, ...) \
> >>         printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> >> 
> >> (that is, gcc emits redefinition warnings on modules which
> >> #define DEBUG on their own and also include mtd.h)
> >> Unfortunately, the DEBUG macro is used rather heavily under
> >> drivers/mtd.  Should we resolve this somehow or is it better
> >> to just live with it?
> >
> > IMO, this MTD debug stuff is not very useful and could be just killed.
> 
> Well, I found the mtdcore debugging somewhat useful.  But anyway,
> killing it would be about as much work as renaming the macro, or using
> something standard as dev_(v)dbg or pr_debug/devel (btw. what's the
> difference?) instead.  I'm willing to do some mechanical work on either
> one if you wish.

Yeah, probalby you can transform them to dev_dbg. But the "levels" do
not seem to be available with dev_dbg, so I guess you could nuke some
higher level messages?

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


      parent reply	other threads:[~2010-04-08  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 12:55 CONFIG_MTD_DEBUG vs generic DEBUG support in kernel.h Ferenc Wagner
2010-03-16 13:05 ` Artem Bityutskiy
2010-03-18 16:20   ` Ferenc Wagner
2010-03-19  0:36     ` Wolfram Sang
2010-04-08  8:06     ` Artem Bityutskiy [this message]

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=1270713980.6754.94.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=wferi@niif.hu \
    /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;
as well as URLs for NNTP newsgroup(s).