ARM: OMAP: Fix for omap3_noncore_dpll_enable() warning
PATCH 1/1 ARM: OMAP: Fix for omap3_noncore_dpll_enable() warning
In reply to a message not in the archiveHi,
This patch fixes this warning which, as Tomi Valkeinen pointed out, is
really an error.
CC arch/arm/mach-omap2/clock34xx.oarch/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
arch/arm/mach-omap2/clock34xx.c renamed from arch/arm/mach-omap2/clock34xx.c.~1~ +5 -6
@@ -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(strreturn -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; }/**
Paul Walmsley
maintainerHi Rick,
Quoted 2 lines · Rick Bronson
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
Quoted 36 lines
CC
arch/arm/mach-omap2/clock34xx.oarch/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 functionarch/arm/mach-omap2/clock34xx.c renamed from arch/arm/mach-omap2/clock34xx.c.~1~ +5
-7@@ -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(strreturn -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; }/** --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
- Paul