Re: [PATCH v2 1/2] clk: vt8500: fix gcc-4.9 warnings

From: Stephen Boyd
Date: Mon Jun 20 2016 - 20:49:19 EST


On 06/08, Roman Volkov wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> This fixes some false positive warnings we get with older compiler
> versions:
>
> clk-vt8500.c: In function âwm8650_find_pll_bitsâ:
> clk-vt8500.c:430:12: âbest_div2â may be used uninitialized in this function
> clk-vt8500.c:429:12: âbest_div1â may be used uninitialized in this function
> clk-vt8500.c:428:14: âbest_mulâ may be used uninitialized in this function
> clk-vt8500.c: In function âwm8750_find_pll_bitsâ:
> clk-vt8500.c:509:12: âbest_div2â may be used uninitialized in this function
> clk-vt8500.c:508:12: âbest_div1â may be used uninitialized in this function
> clk-vt8500.c:507:14: âbest_mulâ may be used uninitialized in this function
> clk-vt8500.c: In function âwm8850_find_pll_bitsâ:
> clk-vt8500.c:560:12: âbest_div2â may be used uninitialized in this function
> clk-vt8500.c:559:12: âbest_div1â may be used uninitialized in this function
> clk-vt8500.c:558:14: âbest_mulâ may be used uninitialized in this function
>
> As the local variables are only use for temporaries, we can just
> as well assign the final values directly, which also makes the
> code slightly shorter.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> Signed-off-by: Roman Volkov <rvolkov@xxxxxxxxx>
> ---

Applied to clk-next

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project