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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdYL_fjvcG3Ss=yk=E1i5JKox9-sTaFzKjG8O1Osez5tQ@mail.gmail.com>
Date:	Mon, 9 Nov 2015 11:21:46 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc:	Stephen Boyd <sboyd@...eaurora.org>, Simon <horms@...ge.net.au>,
	Michael Turquette <mturquette@...libre.com>,
	Magnus <magnus.damm@...il.com>,
	Linux-SH <linux-sh@...r.kernel.org>,
	Linux-Kernel <linux-kernel@...r.kernel.org>,
	linux-clk@...r.kernel.org
Subject: Re: [PATCH v5] clk: add CS2000 Fractional-N driver

On Mon, Nov 9, 2015 at 2:49 AM, Kuninori Morimoto
<kuninori.morimoto.gx@...esas.com> wrote:

>> > +static int cs2000_wait_pll_lock(struct cs2000_priv *priv)
>> > +{
>> > +       struct device *dev = priv_to_dev(priv);
>> > +       s32 val;
>> > +       unsigned int i;
>> > +
>> > +       for (i = 0; i < 256; i++) {
>> > +               val = cs2000_read(priv, DEVICE_CTRL);
>> > +               if (val < 0)
>> > +                       return val;
>> > +               if (!(val & PLL_UNLOCK))
>> > +                       return 0;
>> > +               udelay(1);
>> > +       }
>>
>> unsigned int i = 256;
>>
>> do {
>> val = read();
>> …
>> while ((val & PLL_UNLOCK) && --i);
>>
>> if (!i) {
>>  …
>>  return -EIO;
>>
>> Actually -ETIMEDOUT ?
>>
>> }
>
> What is the motivation of above ?
> It needs "i" anyway ? it needs to check (val < 0) anyway ?
> what is the difference between do {} while <-> for(xxx)

Just a style.
Still the question about error code.

>> > +       of_property_read_string(np, "clock-output-names", &name);
>>
>> What about device property API?
>
> Sorry, which API ?
> Many other clk-xxx.c are using this style ?

Never mind then.

-- 
With Best Regards,
Andy Shevchenko
--
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