* [PATCH] clk: st: avoid build warnings
@ 2014-06-04 15:32 Arnd Bergmann
2014-06-05 8:47 ` Maxime Coquelin
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2014-06-04 15:32 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
index 4f53ee0..1d2ecfe 100644
--- a/drivers/clk/st/clkgen-fsyn.c
+++ b/drivers/clk/st/clkgen-fsyn.c
@@ -416,12 +416,6 @@ static long quadfs_pll_fs660c32_round_rate(struct clk_hw *hw, unsigned long rate
if (!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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] clk: st: avoid build warnings
2014-06-04 15:32 [PATCH] clk: st: avoid build warnings Arnd Bergmann
@ 2014-06-05 8:47 ` Maxime Coquelin
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2014-06-05 8:47 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On 06/04/2014 05:32 PM, Arnd Bergmann wrote:
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
You can add my:
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-05 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-04 15:32 [PATCH] clk: st: avoid build warnings Arnd Bergmann
2014-06-05 8:47 ` Maxime Coquelin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.