mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry <dbaryshkov@gmail.com>
To: "Pavel Machek" <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	"Haavard Skinnemoen" <haavard.skinnemoen@atmel.com>,
	"Russell King" <rmk+lkml@arm.linux.org.uk>,
	"Paul Mundt" <lethal@linux-sh.org>,
	"pHilipp Zabel" <philipp.zabel@gmail.com>,
	tony@atomide.com, paul@pwsan.com
Subject: Re: [PATCH 1/6] Clocklib: add generic framework for managing clocks.
Date: Mon, 31 Mar 2008 19:18:54 +0300	[thread overview]
Message-ID: <bc64b4640803310918u71bb2e2axeef67b13ad507ceb@mail.gmail.com> (raw)
In-Reply-To: <20080331145515.GA10969@atrey.karlin.mff.cuni.cz>

2008/3/31, Pavel Machek <pavel@ucw.cz>:
>
>  > +int __must_check clk_register(struct clk *clk);
>  > +void clk_unregister(struct clk *clk);
>  > +static void __maybe_unused clks_unregister(struct clk **clks, size_t num)
>  > +{
>  > +     int i;
>  > +     for (i = num - 1; i >= 0;  i++) {
>  > +             clk_unregister(clks[i]);
>  > +     }
>  > +}
>  > +
>  > +static int __must_check __maybe_unused clks_register(struct clk **clks, size_t num)
>  > +{
>  > +     int i;
>  > +     int ret;
>  > +     for (i = 0; i < num; i++) {
>  > +             ret = clk_register(clks[i]);
>  > +             if (ret != 0)
>  > +                     goto cleanup;
>  > +     }
>  > +
>  > +     return 0;
>  > +
>  > +cleanup:
>  > +     clks_unregister(clks, i);
>  > +
>  > +     for (i -- ; i >= 0; i--) {
>
>
> "for (i--;"

ack

>
> > +             clk_unregister(clks[i]);
>  > +     }
>  > +
>  > +     return ret;
>
>
> Hmm, clk_unregister is _very_ similar to clks_unregister....

oops :)

-- 
With best wishes
Dmitry

  reply	other threads:[~2008-03-31 16:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31  8:39 [PATCH 0/6] Clocklib: generic clocks framework Dmitry Baryshkov
2008-03-31  8:44 ` [PATCH 1/6] Clocklib: add generic framework for managing clocks Dmitry Baryshkov
2008-03-31 14:55   ` Pavel Machek
2008-03-31 16:18     ` Dmitry [this message]
2008-03-31  8:44 ` [PATCH 2/6] Clocklib: debugfs support Dmitry Baryshkov
2008-03-31  8:44 ` [PATCH 3/6] Clocklib: support sa1100 sub-arch Dmitry Baryshkov
2008-03-31  8:44 ` [PATCH 4/6] Clocklib: support ARM pxa sub-arch Dmitry Baryshkov
2008-03-31  8:44 ` [PATCH 5/6] Clocklib: Use correct clock for IrDA on pxa Dmitry Baryshkov
2008-03-31  8:45 ` [PATCH 6/6] Clocklib: use correct name for 3,6MHz clock Dmitry Baryshkov
2008-03-31  8:42 [PATCH 1/6] Clocklib: add generic framework for managing clocks Dmitry Baryshkov
2008-04-03 13:21 [PATCH 0/6] Clocklib: generic clocks framework Dmitry Baryshkov
2008-04-03 13:23 ` [PATCH 1/6] Clocklib: add generic framework for managing clocks Dmitry Baryshkov
2008-04-07 22:55   ` Andrew Morton

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=bc64b4640803310918u71bb2e2axeef67b13ad507ceb@mail.gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=pavel@ucw.cz \
    --cc=philipp.zabel@gmail.com \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=tony@atomide.com \
    /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