clk: st: avoid build warnings
PATCH 1/1 clk: st: avoid build warnings
This driver prints some variables in debugging output when their contents are undefined.
drivers/clk/st/clkgen-fsyn.c: In function 'quadfs_pll_fs660c32_round_rate':drivers/clk/st/clkgen-fsyn.c:419:93: warning: 'params.sdiv' may be used uninitialized in this function [-Wmaybe-uninitialized]
pr_debug("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n",
^
drivers/clk/st/clkgen-fsyn.c:414:16: note: 'params.sdiv' was declared here
struct stm_fs params;
^This removes them from the output.
drivers/clk/st/clkgen-fsyn.c +2 -9
@@ -416,12 +416,6 @@ static long quadfs_pll_fs660c32_round_rate(struct clk_hw *hw, unsigned long rateif (!clk_fs660c32_vco_get_params (*prate, rate, ¶ms))clk_fs660c32_vco_get_rate (*prate, ¶ms, &rate); -pr_debug ("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n" , - __func__,__clk_get_name (hw->clk), - rate, (unsigned int )params.sdiv, - (unsigned int )params.mdiv, - (unsigned int )params.pe, (unsigned int )params.nsdiv); -return rate; }
@@ -439,9 +433,8 @@ static int quadfs_pll_fs660c32_set_rate(struct clk_hw *hw, unsigned long rate,if (!clk_fs660c32_vco_get_params (parent_rate, rate, ¶ms))clk_fs660c32_vco_get_rate (parent_rate, ¶ms, &hwrate); -pr_debug ("%s: %s new rate %ld [ndiv=0x%x]\n" , - __func__,__clk_get_name (hw->clk), - hwrate, (unsigned int )params.ndiv); +pr_debug ("%s: %s new rate %ld\n" , + __func__,__clk_get_name (hw->clk), hwrate);if (!hwrate)return -EINVAL ;
PATCH 1/1 clk: st: avoid build warnings
Hi Arnd,
Quoted 6 lines · Arnd Bergmann
This driver prints some variables in debugging output when their contents are undefined.
drivers/clk/st/clkgen-fsyn.c: In function 'quadfs_pll_fs660c32_round_rate':drivers/clk/st/clkgen-fsyn.c:419:93: warning: 'params.sdiv' may be used uninitialized in this function [-Wmaybe-uninitialized]
pr_debug("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n",
Quoted 9 lines
^ drivers/clk/st/clkgen-fsyn.c:414:16: note: 'params.sdiv' was declared here struct stm_fs params; ^This removes them from the output.
Signed-off-by Arnd Bergmann <[email protected]>
You can add my:
Thanks!
Maxime