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]
Date:   Mon, 19 Mar 2018 18:11:32 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        afaerber@...e.de, mark.rutland@....com, mturquette@...libre.com,
        robh+dt@...nel.org
Cc:     liuwei@...ions-semi.com, mp-cs@...ions-semi.com,
        96boards@...obotics.com, devicetree@...r.kernel.org,
        davem@...emloft.net, mchehab@...nel.org,
        daniel.thompson@...aro.org, amit.kucheria@...aro.org,
        viresh.kumar@...aro.org, hzhang@...obotics.com,
        bdong@...obotics.com, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        manivannanece23@...il.com,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: Re: [PATCH v5 08/12] clk: actions: Add factor clock support

Quoting Manivannan Sadhasivam (2018-03-17 03:09:48)
> +
> +static int clk_val_best(struct clk_hw *hw, unsigned long rate,
> +                       unsigned long *best_parent_rate)
> +{
[...]
> +               }
> +
> +               parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw),
> +                               try_parent_rate);
> +               cur_rate = DIV_ROUND_UP(parent_rate, clkt->div) * clkt->mul;
> +               if (cur_rate <= rate && cur_rate > best) {
> +                       bestval = clkt->val;
> +                       best = cur_rate;
> +                       *best_parent_rate = parent_rate;
> +               }
> +       }
> +
> +       if (!bestval) {
> +               bestval = _get_table_maxval(clkt);
> +               *best_parent_rate = clk_hw_round_rate(
> +                               clk_hw_get_parent(hw), 1);
> +       }
> +
> +       return bestval;

Also, if this is largely copy/paste from the factor clk code then
perhaps those functions can be exported to here and reused instead of
copy/paste.

> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ