public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Scott E. Preece" <preece@motorola.com>
Cc: shd@zakalwe.fi, linux-pm@lists.osdl.org,
	linux-kernel@vger.kernel.org, ext-Tuukka.Tikkanen@nokia.com
Subject: Re: [RFC] OMAP1 PM Core, PM Core  Implementation 2/2
Date: Wed, 4 Oct 2006 23:25:45 +0200	[thread overview]
Message-ID: <20061004212545.GD8437@elf.ucw.cz> (raw)
In-Reply-To: <200610021919.k92JJMs1011215@olwen.urbana.css.mot.com>

Hi!

> | > > > +static long 
> | > > > +get_vtg(const char *vdomain)
> | > > > +{
> | > > > +	long ret = 0;
> | > > 
> | > > Unnecessary initialisation.
> | > 
> | > No, sorry.
> | 
> | In get_vtg(), if VOLTAGE_FRAMEWORK is defined then
> | 
> | 	ret = vtg_get_voltage(v);
> | 
> | is the first user. If VOLTAGE_FRAMEWORK is not defined, the first user is:
> | 
> | 	ret = vtg_get_voltage(&vhandle);
> | 
> | Then "return ret;" follows. I cannot see a path where 
> | pre-initialisation of ret does anything useful. If someone removed the
> | #else part, the compiler would bark.
> ---
> 
> True, but a good compiler should remove the dead initialization...

True, but efficient code is only one of constraints. Code should be
easy to read, too.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2006-10-04 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-02 19:19 [linux-pm] [RFC] OMAP1 PM Core, PM Core Implementation 2/2 Scott E. Preece
2006-10-04 21:25 ` Pavel Machek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-04 21:33 Scott E. Preece
2006-09-29 22:24 Eugeny S. Mints
2006-10-01 15:22 ` Heikki Orsila
2006-10-01 17:10   ` [linux-pm] " Pavel Machek
2006-10-01 17:32     ` Heikki Orsila
2006-10-01 17:37       ` 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=20061004212545.GD8437@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=ext-Tuukka.Tikkanen@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=preece@motorola.com \
    --cc=shd@zakalwe.fi \
    /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