lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201509302349.xFtKo249%fengguang.wu@intel.com>
Date:	Wed, 30 Sep 2015 23:42:23 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Damien Horsley <Damien.Horsley@...tec.com>
Cc:	kbuild-all@...org, alsa-devel@...a-project.org,
	Mark Rutland <mark.rutland@....com>,
	devicetree@...r.kernel.org, Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
	Takashi Iwai <tiwai@...e.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Kumar Gala <galak@...eaurora.org>,
	"Damien.Horsley" <Damien.Horsley@...tec.com>
Subject: Re: [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output
 controller

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

Download attachment ".config.gz" of type "application/octet-stream" (50074 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ