[alsa-devel] [PATCH 2/2] ASoC: codec: wm8960: Relax bit clock computation when using PLL

kbuild test robot lkp at intel.com
Wed Apr 5 12:17:13 CEST 2017


Hi Daniel,

[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20170405]
[cannot apply to v4.11-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Daniel-Baluta/ASoC-codec-wm8960-Relax-bit-clock-computation-when-using-PLL/20170405-144647
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-randconfig-s0-201714 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   sound/soc/codecs/wm8960.c: In function 'wm8960_configure_clocking':
>> sound/soc/codecs/wm8960.c:743:3: warning: 'best_freq_out' may be used uninitialized in this function [-Wmaybe-uninitialized]
      wm8960_set_pll(codec, freq_in, best_freq_out);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/wm8960.c:703:21: note: 'best_freq_out' was declared here
     int diff, closest, best_freq_out;
                        ^~~~~~~~~~~~~
   sound/soc/codecs/wm8960.c:806:56: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
     snd_soc_update_bits(codec, WM8960_CLOCK1, 0x7 << 6, j << 6);
                                                         ~~^~~~
   sound/soc/codecs/wm8960.c:802:54: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
     snd_soc_update_bits(codec, WM8960_CLOCK1, 3 << 1, i << 1);
                                                       ~~^~~~

vim +/best_freq_out +743 sound/soc/codecs/wm8960.c

6b662dee Daniel Baluta 2017-04-04  727  					*bclk_idx = k;
6b662dee Daniel Baluta 2017-04-04  728  					best_freq_out = freq_out;
6b662dee Daniel Baluta 2017-04-04  729  					break;
6b662dee Daniel Baluta 2017-04-04  730  				}
16c42f46 Daniel Baluta 2017-04-04  731  				if (diff > 0 && closest > diff) {
16c42f46 Daniel Baluta 2017-04-04  732  					*sysclk_idx = i;
16c42f46 Daniel Baluta 2017-04-04  733  					*dac_idx = j;
16c42f46 Daniel Baluta 2017-04-04  734  					*bclk_idx = k;
16c42f46 Daniel Baluta 2017-04-04  735  					closest = diff;
16c42f46 Daniel Baluta 2017-04-04  736  					best_freq_out = freq_out;
16c42f46 Daniel Baluta 2017-04-04  737  				}
6b662dee Daniel Baluta 2017-04-04  738  			}
6b662dee Daniel Baluta 2017-04-04  739  		}
6b662dee Daniel Baluta 2017-04-04  740  	}
6b662dee Daniel Baluta 2017-04-04  741  
6b662dee Daniel Baluta 2017-04-04  742  	if (*bclk_idx != -1)
6b662dee Daniel Baluta 2017-04-04 @743  		wm8960_set_pll(codec, freq_in, best_freq_out);
6b662dee Daniel Baluta 2017-04-04  744  
6b662dee Daniel Baluta 2017-04-04  745  	return *bclk_idx;
6b662dee Daniel Baluta 2017-04-04  746  }
3176bf2d Zidan Wang    2015-08-11  747  static int wm8960_configure_clocking(struct snd_soc_codec *codec)
0e50b51a Zidan Wang    2015-05-12  748  {
0e50b51a Zidan Wang    2015-05-12  749  	struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
6b662dee Daniel Baluta 2017-04-04  750  	int freq_out, freq_in;
0e50b51a Zidan Wang    2015-05-12  751  	u16 iface1 = snd_soc_read(codec, WM8960_IFACE1);

:::::: The code at line 743 was first introduced by commit
:::::: 6b662deec0da0ad4f9dce8112d01828ed72b5a4c ASoC: codec: wm9860: Refactor PLL out freq search

:::::: TO: Daniel Baluta <daniel.baluta at nxp.com>
:::::: CC: 0day robot <fengguang.wu at intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33329 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170405/48048f0b/attachment-0001.bin>


More information about the Alsa-devel mailing list