linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller
       [not found] <1443625696-29296-5-git-send-email-Damien.Horsley@imgtec.com>
@ 2015-09-30 15:42 ` kbuild test robot
  2015-09-30 18:13 ` kbuild test robot
  2015-09-30 18:34 ` kbuild test robot
  2 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2015-09-30 15:42 UTC (permalink / raw)
  To: Damien Horsley
  Cc: kbuild-all, alsa-devel, Mark Rutland, devicetree, Pawel Moll,
	Ian Campbell, linux-kernel, Mark Brown, Takashi Iwai,
	Liam Girdwood, Rob Herring, Kumar Gala, Damien.Horsley

[-- Attachment #1: Type: text/plain, Size: 4572 bytes --]

Hi Damien.Horsley,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: x86_64-allmodconfig (attached as .config)
reproduce:
  git checkout 5037c15dd47c86ab337b73c7f9ffcabe1bb86f3b
  # save the attached .config to linux build tree
  make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   sound/soc/img/img-i2s-out.c:218:16: sparse: incorrect type in assignment (different base types)
   sound/soc/img/img-i2s-out.c:218:16:    expected unsigned int [unsigned] format
   sound/soc/img/img-i2s-out.c:218:16:    got restricted snd_pcm_format_t
   sound/soc/img/img-i2s-out.c:222:23: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-out.c: In function 'img_i2s_out_hw_params':
>> sound/soc/img/img-i2s-out.c:263:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     control_mask = ~IMG_I2S_OUT_CTL_CLK_MASK &
                    ^
   sound/soc/img/img-i2s-out.c: In function 'img_i2s_out_set_fmt':
   sound/soc/img/img-i2s-out.c:336:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     control_mask = ~IMG_I2S_OUT_CTL_CLK_EN_MASK &
                    ^
   sound/soc/img/img-i2s-out.c:341:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     chan_control_mask = ~IMG_I2S_OUT_CHAN_CTL_CLKT_MASK;
                         ^

sparse warnings: (new ones prefixed by >>)

>> sound/soc/img/img-i2s-out.c:218:16: sparse: incorrect type in assignment (different base types)
   sound/soc/img/img-i2s-out.c:218:16:    expected unsigned int [unsigned] format
   sound/soc/img/img-i2s-out.c:218:16:    got restricted snd_pcm_format_t
>> sound/soc/img/img-i2s-out.c:222:23: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-out.c: In function 'img_i2s_out_hw_params':
   sound/soc/img/img-i2s-out.c:263:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     control_mask = ~IMG_I2S_OUT_CTL_CLK_MASK &
                    ^
   sound/soc/img/img-i2s-out.c: In function 'img_i2s_out_set_fmt':
   sound/soc/img/img-i2s-out.c:336:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     control_mask = ~IMG_I2S_OUT_CTL_CLK_EN_MASK &
                    ^
   sound/soc/img/img-i2s-out.c:341:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     chan_control_mask = ~IMG_I2S_OUT_CHAN_CTL_CLKT_MASK;
                         ^

vim +263 sound/soc/img/img-i2s-out.c

   212		unsigned int channels, i2s_channels, format;
   213		long pre_div_a, pre_div_b, diff_a, diff_b, rate, clk_rate;
   214		int i;
   215		u32 reg, control_reg, control_mask, control_set = 0;
   216	
   217		rate = params_rate(params);
 > 218		format = params_format(params);
   219		channels = params_channels(params);
   220		i2s_channels = channels / 2;
   221	
 > 222		if (format != SNDRV_PCM_FORMAT_S32_LE)
   223			return -EINVAL;
   224	
   225		if ((channels < 2) ||
   226				(channels > (i2s->max_i2s_chan * 2)) ||
   227				(channels % 2))
   228			return -EINVAL;
   229	
   230		pre_div_a = clk_round_rate(i2s->clk_ref, rate * 256);
   231		if (pre_div_a < 0)
   232			return pre_div_a;
   233		pre_div_b = clk_round_rate(i2s->clk_ref, rate * 384);
   234		if (pre_div_b < 0)
   235			return pre_div_b;
   236	
   237		diff_a = abs((pre_div_a / 256) - rate);
   238		diff_b = abs((pre_div_b / 384) - rate);
   239	
   240		/* If diffs are equal, use lower clock rate */
   241		if (diff_a > diff_b)
   242			clk_set_rate(i2s->clk_ref, pre_div_b);
   243		else
   244			clk_set_rate(i2s->clk_ref, pre_div_a);
   245	
   246		/*
   247		 * Another driver (eg alsa machine driver) may have rejected the above
   248		 * change. Get the current rate and set the register bit according to
   249		 * the new minimum diff
   250		 */
   251		clk_rate = clk_get_rate(i2s->clk_ref);
   252	
   253		diff_a = abs((clk_rate / 256) - rate);
   254		diff_b = abs((clk_rate / 384) - rate);
   255	
   256		if (diff_a > diff_b)
   257			control_set |= IMG_I2S_OUT_CTL_CLK_MASK;
   258	
   259		control_set |= (((i2s_channels - 1) <<
   260				IMG_I2S_OUT_CTL_ACTIVE_CHAN_SHIFT) &
   261				IMG_I2S_OUT_CTL_ACTIVE_CHAN_MASK);
   262	
 > 263		control_mask = ~IMG_I2S_OUT_CTL_CLK_MASK &
   264				~IMG_I2S_OUT_CTL_ACTIVE_CHAN_MASK;
   265	
   266		control_reg = img_i2s_out_disable(i2s);

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 50074 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller
       [not found] <1443625696-29296-5-git-send-email-Damien.Horsley@imgtec.com>
  2015-09-30 15:42 ` [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller kbuild test robot
@ 2015-09-30 18:13 ` kbuild test robot
  2015-09-30 18:34 ` kbuild test robot
  2 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2015-09-30 18:13 UTC (permalink / raw)
  To: Damien Horsley
  Cc: kbuild-all, alsa-devel, Mark Rutland, devicetree, Pawel Moll,
	Ian Campbell, linux-kernel, Mark Brown, Takashi Iwai,
	Liam Girdwood, Rob Herring, Kumar Gala, Damien.Horsley

[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]

Hi Damien.Horsley,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: sh-allyesconfig (attached as .config)
reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 5037c15dd47c86ab337b73c7f9ffcabe1bb86f3b
  # save the attached .config to linux build tree
  make.cross ARCH=sh 

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/img/img-i2s-out.c: In function 'img_i2s_out_set_fmt':
>> sound/soc/img/img-i2s-out.c:108:2: warning: 'reg' may be used uninitialized in this function [-Wuninitialized]
   sound/soc/img/img-i2s-out.c:291:6: note: 'reg' was declared here

vim +/reg +108 sound/soc/img/img-i2s-out.c

    92	}
    93	
    94	static inline void img_i2s_out_writel(struct img_i2s_out *i2s, u32 val,
    95						u32 reg)
    96	{
    97		writel(val, i2s->base + reg);
    98	}
    99	
   100	static inline u32 img_i2s_out_readl(struct img_i2s_out *i2s, u32 reg)
   101	{
   102		return readl(i2s->base + reg);
   103	}
   104	
   105	static inline void img_i2s_out_ch_writel(struct img_i2s_out *i2s,
   106						u32 chan, u32 val, u32 reg)
   107	{
 > 108		writel(val, i2s->channel_base + (chan * IMG_I2S_OUT_CH_STRIDE) + reg);
   109	}
   110	
   111	static inline u32 img_i2s_out_ch_readl(struct img_i2s_out *i2s, u32 chan,
   112						u32 reg)
   113	{
   114		return readl(i2s->channel_base + (chan * IMG_I2S_OUT_CH_STRIDE) + reg);
   115	}
   116	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37263 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller
       [not found] <1443625696-29296-5-git-send-email-Damien.Horsley@imgtec.com>
  2015-09-30 15:42 ` [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller kbuild test robot
  2015-09-30 18:13 ` kbuild test robot
@ 2015-09-30 18:34 ` kbuild test robot
  2 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2015-09-30 18:34 UTC (permalink / raw)
  To: Damien Horsley
  Cc: kbuild-all, alsa-devel, Mark Rutland, devicetree, Pawel Moll,
	Ian Campbell, linux-kernel, Mark Brown, Takashi Iwai,
	Liam Girdwood, Rob Herring, Kumar Gala, Damien.Horsley

[-- Attachment #1: Type: text/plain, Size: 2820 bytes --]

Hi Damien.Horsley,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: blackfin-allmodconfig (attached as .config)
reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 5037c15dd47c86ab337b73c7f9ffcabe1bb86f3b
  # save the attached .config to linux build tree
  make.cross ARCH=blackfin 

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/img/img-i2s-out.c: In function 'img_i2s_out_set_fmt':
>> include/asm-generic/io.h:163:2: warning: 'reg' may be used uninitialized in this function [-Wuninitialized]
   sound/soc/img/img-i2s-out.c:291:6: note: 'reg' was declared here

vim +/reg +163 include/asm-generic/io.h

9216efaf Thierry Reding 2014-10-01  147  	__raw_writeb(value, addr);
3f7e212d Arnd Bergmann  2009-05-13  148  }
9216efaf Thierry Reding 2014-10-01  149  #endif
3f7e212d Arnd Bergmann  2009-05-13  150  
9216efaf Thierry Reding 2014-10-01  151  #ifndef writew
9216efaf Thierry Reding 2014-10-01  152  #define writew writew
9216efaf Thierry Reding 2014-10-01  153  static inline void writew(u16 value, volatile void __iomem *addr)
3f7e212d Arnd Bergmann  2009-05-13  154  {
9216efaf Thierry Reding 2014-10-01  155  	__raw_writew(cpu_to_le16(value), addr);
3f7e212d Arnd Bergmann  2009-05-13  156  }
9216efaf Thierry Reding 2014-10-01  157  #endif
3f7e212d Arnd Bergmann  2009-05-13  158  
9216efaf Thierry Reding 2014-10-01  159  #ifndef writel
9216efaf Thierry Reding 2014-10-01  160  #define writel writel
9216efaf Thierry Reding 2014-10-01  161  static inline void writel(u32 value, volatile void __iomem *addr)
3f7e212d Arnd Bergmann  2009-05-13  162  {
9216efaf Thierry Reding 2014-10-01 @163  	__raw_writel(__cpu_to_le32(value), addr);
3f7e212d Arnd Bergmann  2009-05-13  164  }
9216efaf Thierry Reding 2014-10-01  165  #endif
3f7e212d Arnd Bergmann  2009-05-13  166  
9216efaf Thierry Reding 2014-10-01  167  #ifdef CONFIG_64BIT
9216efaf Thierry Reding 2014-10-01  168  #ifndef writeq
9216efaf Thierry Reding 2014-10-01  169  #define writeq writeq
9216efaf Thierry Reding 2014-10-01  170  static inline void writeq(u64 value, volatile void __iomem *addr)
3f7e212d Arnd Bergmann  2009-05-13  171  {

:::::: The code at line 163 was first introduced by commit
:::::: 9216efafc52ff99e9351ef60de5fcafc2bc8adb6 asm-generic/io.h: Reconcile I/O accessor overrides

:::::: TO: Thierry Reding <treding@nvidia.com>
:::::: CC: Thierry Reding <treding@nvidia.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37945 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-30 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1443625696-29296-5-git-send-email-Damien.Horsley@imgtec.com>
2015-09-30 15:42 ` [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller kbuild test robot
2015-09-30 18:13 ` kbuild test robot
2015-09-30 18:34 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).