From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm <linux-pm@lists.osdl.org>, Pavel Machek <pavel@ucw.cz>
Subject: Re: [RFC][PATCH 1/2] PM: Reduce code duplication in the core suspend code
Date: Mon, 11 Jun 2007 00:43:15 +0200 [thread overview]
Message-ID: <200706110043.15933.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0706101635510.31578-100000@netrider.rowland.org>
On Sunday, 10 June 2007 22:37, Alan Stern wrote:
> On Sun, 10 Jun 2007, Rafael J. Wysocki wrote:
>
> > On Sunday, 10 June 2007 16:55, Alan Stern wrote:
> > > On Sun, 10 Jun 2007, Rafael J. Wysocki wrote:
> > >
> > > > From: Rafael J. Wysocki <rjw@sisk.pl>
> > > >
> > > > Reduce code duplication in drivers/base/suspend.c by introducing an inline
> > > > function for printing diagnostic messages.
> > >
> > > Could you save object-code space by making the function non-inline?
> > > It looks complicated enough.
> >
> > I thought I would do that, but then I thought I'd want it to be compiled out if
> > dev_dbg() were a noop (like when the debugging is off).
>
> You can always do something like this:
>
> #ifdef DEBUG
>
> static void print_msg(...)
> {
> ...
> }
>
> #else
>
> static inline void print_msg(...)
> { }
> #endif
Well, IMHO, that doesn't look very nice. ;-)
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
next prev parent reply other threads:[~2007-06-10 22:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-10 13:19 [RFC][PATCH 0/2] PM: More suspend core modifications Rafael J. Wysocki
2007-06-10 13:21 ` [RFC][PATCH 1/2] PM: Reduce code duplication in the core suspend code Rafael J. Wysocki
2007-06-10 14:55 ` Alan Stern
2007-06-10 16:42 ` Rafael J. Wysocki
2007-06-10 20:37 ` Alan Stern
2007-06-10 22:43 ` Rafael J. Wysocki [this message]
2007-06-10 19:15 ` Pavel Machek
2007-06-10 13:22 ` [RFC][PATCH 2/2] PM: Remove suspend and resume support from struct device_type Rafael J. Wysocki
2007-06-10 19:22 ` Pavel Machek
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=200706110043.15933.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.osdl.org \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
/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