• Arnd Bergmann's avatar
    clk: vt8500: fix gcc-4.9 warnings · 27a0becc
    Arnd Bergmann authored
    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: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarRoman Volkov <rvolkov@v1ros.org>
    Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
    27a0becc
clk-vt8500.c 17.9 KB