Re: [PATCH] cpufreq: Fix unsigned variable being checked for negative value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 18, 2013 at 05:09:42PM +0900, Jonghwan Choi wrote:
> clk_round_rate() returns singed value which was assigned to an unsigned
> variable.
> So it can't be checked for negative.
> 
> Signed-off-by: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx>

Acked-by: Shawn Guo <shawn.guo@xxxxxxxxxx>

> ---
>  drivers/cpufreq/cpufreq-cpu0.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
> index 4e5b7fb..6bb88af 100644
> --- a/drivers/cpufreq/cpufreq-cpu0.c
> +++ b/drivers/cpufreq/cpufreq-cpu0.c
> @@ -44,7 +44,8 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
>  {
>  	struct cpufreq_freqs freqs;
>  	struct opp *opp;
> -	unsigned long freq_Hz, volt = 0, volt_old = 0, tol = 0;
> +	unsigned long volt = 0, volt_old = 0, tol = 0;
> +	long freq_Hz;
>  	unsigned int index, cpu;
>  	int ret;
>  
> -- 
> 1.7.4.1
> 

--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux