[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061001171032.GE2254@elf.ucw.cz>
Date: Sun, 1 Oct 2006 19:10:32 +0200
From: Pavel Machek <pavel@....cz>
To: Heikki Orsila <shd@...alwe.fi>
Cc: "Eugeny S. Mints" <eugeny.mints@...il.com>,
linux-pm@...ts.osdl.org, linux-kernel@...r.kernel.org,
ext-Tuukka.Tikkanen@...ia.com
Subject: Re: [linux-pm] [RFC] OMAP1 PM Core, PM Core Implementation 2/2
On Sun 2006-10-01 18:22:28, Heikki Orsila wrote:
> Some nitpicking about the patch follows..
>
> On Sat, Sep 30, 2006 at 02:24:35AM +0400, Eugeny S. Mints wrote:
> > +static long
> > +get_vtg(const char *vdomain)
> > +{
> > + long ret = 0;
>
> Unnecessary initialisation.
No, sorry.
> > +static long
> > +set_vtg(const char *vdomain, int val)
> > +{
> > + long ret = 0;
>
> here too. This and 'int i = 0;' happens in many functions.
Wrong again. automatic variables are not zero initialized.
> > + err = omap_pm_core_verify_opt(opt);
> > + if (err != 0)
> > + goto out;
> > +
> > + return (void *)opt;
> > +out:
> > + kfree(opt);
> > + return NULL;
> > +}
>
> Maybe use if (err != 0) { kfree(opt); return NULL; } because goto out is
> only used once?
This is actually common kernel idiom, so it is okay to leave like
this. Your other points are ok.
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