[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110518202126.GC8887@elf.ucw.cz>
Date: Wed, 18 May 2011 22:21:26 +0200
From: Pavel Machek <pavel@....cz>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: myungjoo.ham@...il.com, linux-pm@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>,
Mark Brown <broonie@...ena.org.uk>,
Jiejing Zhang <kzjeef@...il.com>,
Colin Cross <ccross@...gle.com>, Nishanth Menon <nm@...com>,
Thomas Gleixner <tglx@...utronix.de>,
Len Brown <len.brown@...el.com>,
Kyungmin Park <kyungmin.park@...sung.com>
Subject: Re: [PATCH v2 1/3] PM: Introduce DEVFREQ: generic DVFS framework
with device-specific OPPs
Hi!
> > >> +#define dev_dbg_once(dev, fmt, ...) \
> > >> + if (!once) { \
> > >> + once = 1; \
> > >> + dev_dbg(dev, pr_fmt(fmt), ##__VA_ARGS__); \
> > >> + }
> > >
> > > Why do you need this?
> > >
> >
> > This devfreq_do is going to be called periodically; thus, I want to
> > print a message if there is an error, but not too many messages with
> > the repeated calls.
> >
> > Besides, I'd change the macro like this:
> >
> > #define dev_dbg_once(dev, fmt, ...) \
> > { \
> > static int once; \
> > if (!once) { \
> > once = 1; \
> > dev_dbg(dev, pr_fmt(fmt), ##__VA_ARGS__); \
> > } \
> > }
> >
> > so that "static int once;" in functions can be removed.
>
> That's a good change in my opinion, but since there is the dynamic debug
> feature, I don't think you need to worry too much about that (the user
> can always disable output from those dev_dbg() statements if they generate
> too much noise).
Well... we do print-once in other places, too. And that way, we can
maybe enable those prints by default...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists