]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
Fix kernel warnings
authorJoe Korty <joe.korty@ccur.com>
Wed, 25 May 2016 12:54:57 +0000 (18:24 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sun, 17 Jul 2016 17:19:19 +0000 (10:19 -0700)
1) rt5659_enable_push_button_irq() is not yet being
used, so comment it out with #ifdef FIXME.
2) Give mt_t an initial value of zero, for those
paths where it is not initialized.

sound/soc/codecs/rt5659.c:1314:13: warning:
'rt5659_enable_push_button_irq' defined but
not used [-Wunused-function]
static void
rt5659_enable_push_button_irq(struct snd_soc_codec *codec,

sound/soc/codecs/rt5659.c: In function 'rt5659_pll_calc':
sound/soc/codecs/rt5659.c:3636:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
pll_code->m_code = m;

Bug 200187768

Change-Id: Ibc5aef1383dd6eb140968e5cf4925f8675d36832
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163939
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
sound/soc/codecs/rt5659.c

index e6433f2e2e4b61e3f2eaef0530dc614457c009f8..b9abf15a8ecd52d2e5acf652ab50e3bde42e00bb 100644 (file)
@@ -3487,7 +3487,7 @@ static int rt5659_pll_calc(const unsigned int freq_in,
         const unsigned int freq_out, struct rt5659_pll_code *pll_code)
 {
         int max_n = RT5659_PLL_N_MAX, max_m = RT5659_PLL_M_MAX;
-        int k, n = 0, m = 0, red, n_t, m_t, pll_out, in_t;
+        int k, n = 0, m = 0, red, n_t, m_t = 0, pll_out, in_t;
         int out_t, red_t = abs(freq_out - freq_in);
         bool bypass = false;