Re: [PATCH] ARM: OMAP: Fix for omap3_noncore_dpll_enable() warning

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

 



Hi Rick,

On Fri, 17 Oct 2008, Rick Bronson wrote:

>   This patch fixes this warning which, as Tomi Valkeinen pointed out, is
> really an error.

thanks for the patch - but _omap3_noncore_dpll_bypass() and 
_omap3_noncore_dpll_lock() don't return rates.  Will post a patch to fix 
this bug shortly.


- Paul

>   CC      arch/arm/mach-omap2/clock34xx.o
> arch/arm/mach-omap2/clock34xx.c: In function 'omap3_noncore_dpll_enable':
> arch/arm/mach-omap2/clock34xx.c:290: warning: 'rate' is used uninitialized in this function
> 
> --- linux-omap-2.6/arch/arm/mach-omap2/clock34xx.c.~1~	2008-10-16 13:33:26.000000000 -0700
> +++ linux-omap-2.6/arch/arm/mach-omap2/clock34xx.c	2008-10-17 07:35:50.000000000 -0700
> @@ -270,8 +270,7 @@ static int _omap3_noncore_dpll_stop(stru
>   */
>  static int omap3_noncore_dpll_enable(struct clk *clk)
>  {
> -	int r;
> -	long rate;
> +	int rate;
>  	struct dpll_data *dd;
>  
>  	if (clk == &dpll3_ck)
> @@ -282,14 +281,14 @@ static int omap3_noncore_dpll_enable(str
>  		return -EINVAL;
>  
>  	if (clk->rate == dd->bypass_clk->rate)
> -		r = _omap3_noncore_dpll_bypass(clk);
> +		rate = _omap3_noncore_dpll_bypass(clk);
>  	else
> -		r = _omap3_noncore_dpll_lock(clk);
> +		rate = _omap3_noncore_dpll_lock(clk);
>  
> -	if (!r)
> +	if (!rate)
>  		clk->rate = rate;
>  
> -	return r;
> +	return rate;
>  }
>  
>  /**
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux