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: <154278740462.88331.17720342357503268022@swboyd.mtv.corp.google.com>
Date:   Wed, 21 Nov 2018 00:03:24 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     Nicolas Boichat <drinkcat@...omium.org>,
        Weiyi Lu <weiyi.lu@...iatek.com>
Cc:     Rob Herring <robh@...nel.org>, srv_heupstream@...iatek.com,
        jamesjj.liao@...iatek.com, sboyd@...eaurora.org,
        lkml <linux-kernel@...r.kernel.org>, fan.chen@...iatek.com,
        linux-mediatek@...ts.infradead.org,
        Matthias Brugger <matthias.bgg@...il.com>,
        owen.chen@...iatek.com, linux-clk@...r.kernel.org,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v1 02/11] clk: mediatek: add new member to mtk_pll_data

Quoting Weiyi Lu (2018-11-19 19:51:20)
> On Tue, 2018-11-13 at 08:18 -0800, Nicolas Boichat wrote:
> > On Mon, Nov 5, 2018 at 10:43 PM Weiyi Lu <weiyi.lu@...iatek.com> wrote:
> > > @@ -138,9 +140,10 @@ static void mtk_pll_set_rate_regs(struct mtk_clk_pll *pll, u32 pcw,
> > >  static void mtk_pll_calc_values(struct mtk_clk_pll *pll, u32 *pcw, u32 *postdiv,
> > >                 u32 freq, u32 fin)
> > >  {
> > > -       unsigned long fmin = 1000 * MHZ;
> > > +       unsigned long fmin = pll->data->fmin ? pll->data->fmin : 1000 * MHZ;
> > 
> > I'd put parentheses around (1000 * MHZ), to avoid the need to think
> > about precedence...
> > 
> 
> OK, thanks for the suggestion. will add in next version

Better style would be to not use a ternary statement for anything like
this and have an if condition instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ