lkml.org 
[lkml]   [2008]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/6] compcache: block device - internal defs
Date
On Tuesday 25 March 2008 02:06:02 am Will Newton wrote:
> On Mon, Mar 24, 2008 at 5:50 PM, Nitin Gupta <nitingupta910@gmail.com> wrote:
> > > > +
> > > > +/* Create /proc/compcache? */
> > > > +/* If STATS is disabled, this will give minimal compcache info */
> > > > +#define CONFIG_COMPCACHE_PROC
> > > > +
> > > > +#if DEBUG
> > > > +#define CC_DEBUG(fmt,arg...) \
> > > > + printk(KERN_DEBUG C fmt,##arg)
> > > > +#else
> > > > +#define CC_DEBUG(fmt,arg...) NOP
> > > > +#endif
> > >
> > > Have you thought about using pr_debug() for this? It looks like it
> > > would simplify this file at the cost of a little flexibility.
> > >
> >
> > I want to enable/disable this debugging based on DEBUG_COMPCACHE flag.
> > Thats why I added these macros. I will do 'printk(KERN_DEBUG' ->
> > pr_debug
>
> The definition of pr_debug (kernel.h) is already surrounded by #ifdef
> DEBUG so it may give you the same behaviour as the CC_DEBUG macro.
>

Yes, I missed this point. But still, I want to have two levels of debugging. I can probably use pr_debug() for "normal" debug and CC_DEBUG for "verbose" debugging. This looks bit inconsistent, so maybe I should stick which CC_DEBUG/CC_DEBUG2 pair instead?

- Nitin


\
 
 \ /
  Last update: 2008-03-24 21:47    [W:0.044 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site