From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: myungjoo.ham@gmail.com, linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
Mark Brown <broonie@sirena.org.uk>,
Jiejing Zhang <kzjeef@gmail.com>, Colin Cross <ccross@google.com>,
Nishanth Menon <nm@ti.com>, Thomas Gleixner <tglx@linutronix.de>,
Len Brown <len.brown@intel.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH v2 1/3] PM: Introduce DEVFREQ: generic DVFS framework with device-specific OPPs
Date: Wed, 18 May 2011 22:21:26 +0200 [thread overview]
Message-ID: <20110518202126.GC8887@elf.ucw.cz> (raw)
In-Reply-To: <201105182202.46820.rjw@sisk.pl>
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
next prev parent reply other threads:[~2011-05-18 20:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 7:58 MyungJoo Ham
2011-05-11 7:58 ` [PATCH v2 2/3] PM / DEVFREQ: add example governors MyungJoo Ham
2011-05-17 22:39 ` Rafael J. Wysocki
2011-05-18 0:48 ` MyungJoo Ham
2011-05-18 19:46 ` Rafael J. Wysocki
2011-05-27 4:42 ` MyungJoo Ham
2011-05-11 7:58 ` [PATCH v2 3/3] PM / DEVFREQ: add sysfs interface (including user tickling) MyungJoo Ham
2011-05-11 22:55 ` Greg KH
2011-05-17 5:04 ` MyungJoo Ham
2011-05-17 18:32 ` Greg KH
2011-05-17 22:41 ` Rafael J. Wysocki
2011-05-18 0:43 ` MyungJoo Ham
2011-05-17 22:36 ` [PATCH v2 1/3] PM: Introduce DEVFREQ: generic DVFS framework with device-specific OPPs Rafael J. Wysocki
2011-05-18 8:22 ` MyungJoo Ham
2011-05-18 20:02 ` Rafael J. Wysocki
2011-05-18 20:21 ` Pavel Machek [this message]
2011-05-18 20:29 ` Rafael J. Wysocki
2011-05-20 5:36 ` MyungJoo Ham
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=20110518202126.GC8887@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=broonie@sirena.org.uk \
--cc=ccross@google.com \
--cc=gregkh@suse.de \
--cc=kyungmin.park@samsung.com \
--cc=kzjeef@gmail.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=myungjoo.ham@gmail.com \
--cc=nm@ti.com \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
/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
Powered by JetHome