Re: [PATCH 2/2] ASoC: stm32: add SAI driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi olivier,

[auto build test WARNING on asoc/for-next]
[also build test WARNING on v4.10-rc6 next-20170201]
[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/olivier-moysan/Add-STM32-SAI-support/20170202-004848
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-allmodconfig (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=x86_64 

All warnings (new ones prefixed by >>):

   In file included from sound/soc/stm/stm32_sai_sub.c:24:0:
   sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_startup':
>> sound/soc/stm/stm32_sai_sub.c:394:21: warning: large integer implicitly truncated to unsigned type [-Woverflow]
          SAI_XSR_MASK, ~SAI_XSR_MASK);
                        ^
   include/linux/regmap.h:70:42: note: in definition of macro 'regmap_update_bits'
     regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
                                             ^~~
   sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_trigger':
   sound/soc/stm/stm32_sai_sub.c:640:24: warning: large integer implicitly truncated to unsigned type [-Woverflow]
           SAI_XCR1_DMAEN, ~SAI_XCR1_DMAEN);
                           ^
   include/linux/regmap.h:70:42: note: in definition of macro 'regmap_update_bits'
     regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
                                             ^~~
   sound/soc/stm/stm32_sai_sub.c:643:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
          SAI_XCR1_SAIEN, ~SAI_XCR1_SAIEN);
                          ^
   include/linux/regmap.h:70:42: note: in definition of macro 'regmap_update_bits'
     regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
                                             ^~~
   sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_sub_probe':
>> sound/soc/stm/stm32_sai_sub.c:844:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     sai->id = (int)of_id->data;
               ^
   sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_hw_params':
   sound/soc/stm/stm32_sai_sub.c:452:11: warning: 'cr1_mask' may be used uninitialized in this function [-Wmaybe-uninitialized]
     cr1_mask |= SAI_XCR1_MONO;
               
   sound/soc/stm/stm32_sai_sub.c:422:11: note: 'cr1_mask' was declared here
     int cr1, cr1_mask, ret;
              ^~~~~~~~
   sound/soc/stm/stm32_sai_sub.c:578:7: warning: 'mask' may be used uninitialized in this function [-Wmaybe-uninitialized]
     mask |= SAI_XCR1_MCKDIV_MASK;
           
   sound/soc/stm/stm32_sai_sub.c:550:11: note: 'mask' was declared here
     int cr1, mask, div = 0;
              ^~~~
   sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_sub_probe':
   sound/soc/stm/stm32_sai_sub.c:788:3: warning: 'direction' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_err(&pdev->dev, "Unsupported direction %s\n", direction);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/stm/stm32_sai_sub.c:765:14: note: 'direction' was declared here
     const char *direction;
                 ^~~~~~~~~

vim +394 sound/soc/stm/stm32_sai_sub.c

   378	static int stm32_sai_startup(struct snd_pcm_substream *substream,
   379				     struct snd_soc_dai *cpu_dai)
   380	{
   381		struct stm32_sai_sub_data *sai = snd_soc_dai_get_drvdata(cpu_dai);
   382		int imr, cr2, ret;
   383	
   384		sai->substream = substream;
   385	
   386		ret = clk_prepare_enable(sai->sai_ck);
   387		if (ret < 0) {
   388			dev_err(cpu_dai->dev, "failed to enable clock: %d\n", ret);
   389			return ret;
   390		}
   391	
   392		/* Enable ITs */
   393		regmap_update_bits(sai->regmap, STM_SAI_SR_REGX,
 > 394				   SAI_XSR_MASK, ~SAI_XSR_MASK);
   395	
   396		regmap_update_bits(sai->regmap, STM_SAI_CLRFR_REGX,
   397				   SAI_XCLRFR_MASK, SAI_XCLRFR_MASK);
   398	
   399		imr = SAI_XIMR_OVRUDRIE;
   400		if (STM_SAI_IS_CAPTURE(sai)) {
   401			regmap_read(sai->regmap, STM_SAI_CR2_REGX, &cr2);
   402			if (cr2 & SAI_XCR2_MUTECNT_MASK)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux