lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 31 Mar 2008 19:18:54 +0300
From:	Dmitry <dbaryshkov@...il.com>
To:	"Pavel Machek" <pavel@....cz>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	"Haavard Skinnemoen" <haavard.skinnemoen@...el.com>,
	"Russell King" <rmk+lkml@....linux.org.uk>,
	"Paul Mundt" <lethal@...ux-sh.org>,
	"pHilipp Zabel" <philipp.zabel@...il.com>, tony@...mide.com,
	paul@...an.com
Subject: Re: [PATCH 1/6] Clocklib: add generic framework for managing clocks.

2008/3/31, Pavel Machek <pavel@....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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ