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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Sep 2012 00:17:56 +0530
From:	Pankaj Jangra <jangra.pankaj9@...il.com>
To:	Stephen Boyd <sboyd@...eaurora.org>
Cc:	David Brown <davidb@...eaurora.org>,
	Daniel Walker <dwalker@...o99.com>,
	Bryan Huntsman <bryanh@...eaurora.org>,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Saravana Kannan <skannan@...eaurora.org>,
	Mike Turquette <mturquette@...aro.org>
Subject: Re: [PATCH 10/10] ARM: msm: Migrate to common clock framework

Hi Stephen,

On Fri, Sep 21, 2012 at 7:56 AM, Stephen Boyd <sboyd@...eaurora.org> wrote:

> -static int pc_clk_set_rate(unsigned id, unsigned rate)
> +static int pc_clk_set_rate(struct clk_hw *hw, unsigned long new_rate,
> +                          unsigned long p_rate)
>  {
> -       /* The rate _might_ be rounded off to the nearest KHz value by the
> +       struct clk_pcom *p = to_clk_pcom(hw);
> +       unsigned id = p->id, rate = new_rate;
> +       int rc;
> +
> +       /*
> +        * The rate _might_ be rounded off to the nearest KHz value by the
>          * remote function. So a return value of 0 doesn't necessarily mean
>          * that the exact rate was set successfully.
>          */
> -       int rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
> -       if (rc < 0)
> -               return rc;
> -       else
> -               return (int)id < 0 ? -EINVAL : 0;
> -}
> -
> -static int pc_clk_set_min_rate(unsigned id, unsigned rate)
> -{
> -       int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate);
> -       if (rc < 0)
> -               return rc;
> +       if (p->flags & CLKFLAG_MIN)
> +               rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate);

You are missing if condition here checking the rc ?

>         else
> -               return (int)id < 0 ? -EINVAL : 0;
> -}
> -
> -static int pc_clk_set_max_rate(unsigned id, unsigned rate)
> -{
> -       int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MAX_RATE, &id, &rate);

and else here i think for the MIN_FLAG if check.

> +               rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
>         if (rc < 0)
>                 return rc;
>         else
>                 return (int)id < 0 ? -EINVAL : 0;
>  }
>
--
Pankaj Jangra
--
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