Re: [alsa-devel] [PATCH 02/10] ASoC: img: Add driver for I2S input controller

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

 




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 4cccb3ee5a59803694ffb4e45054f3981e02aa4c
  # save the attached .config to linux build tree
  make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   sound/soc/img/img-i2s-in.c:191:16: sparse: incorrect type in assignment (different base types)
   sound/soc/img/img-i2s-in.c:191:16:    expected unsigned int [unsigned] format
   sound/soc/img/img-i2s-in.c:191:16:    got restricted snd_pcm_format_t
   sound/soc/img/img-i2s-in.c:196:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-in.c:202:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-in.c:207:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-in.c: In function 'img_i2s_in_hw_params':
>> sound/soc/img/img-i2s-in.c:237:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     chan_control_mask = ~IMG_I2S_IN_CH_CTL_16PACK_MASK &
                         ^
   sound/soc/img/img-i2s-in.c: In function 'img_i2s_in_set_fmt':
   sound/soc/img/img-i2s-in.c:306:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     chan_control_mask = ~IMG_I2S_IN_CH_CTL_CLK_TRANS_MASK;
                         ^

sparse warnings: (new ones prefixed by >>)

>> sound/soc/img/img-i2s-in.c:191:16: sparse: incorrect type in assignment (different base types)
   sound/soc/img/img-i2s-in.c:191:16:    expected unsigned int [unsigned] format
   sound/soc/img/img-i2s-in.c:191:16:    got restricted snd_pcm_format_t
>> sound/soc/img/img-i2s-in.c:196:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-in.c:202:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-in.c:207:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/soc/img/img-i2s-in.c: In function 'img_i2s_in_hw_params':
   sound/soc/img/img-i2s-in.c:237:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     chan_control_mask = ~IMG_I2S_IN_CH_CTL_16PACK_MASK &
                         ^
   sound/soc/img/img-i2s-in.c: In function 'img_i2s_in_set_fmt':
   sound/soc/img/img-i2s-in.c:306:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     chan_control_mask = ~IMG_I2S_IN_CH_CTL_CLK_TRANS_MASK;
                         ^

vim +237 sound/soc/img/img-i2s-in.c

   185		unsigned int bclk_filter_enable, bclk_filter_value;
   186		int i, ret = 0;
   187		u32 reg, control_reg, control_mask, chan_control_mask;
   188		u32 control_set = 0, chan_control_set = 0;
   189	
   190		rate = params_rate(params);
 > 191		format = params_format(params);
   192		channels = params_channels(params);
   193		i2s_channels = channels / 2;
   194	
   195		switch (format) {
 > 196		case SNDRV_PCM_FORMAT_S32_LE:
   197			frame_size = 64;
   198			chan_control_set |= IMG_I2S_IN_CH_CTL_SW_MASK;
   199			chan_control_set |= IMG_I2S_IN_CH_CTL_FW_MASK;
   200			chan_control_set |= IMG_I2S_IN_CH_CTL_PACKH_MASK;
   201			break;
   202		case SNDRV_PCM_FORMAT_S24_LE:
   203			frame_size = 64;
   204			chan_control_set |= IMG_I2S_IN_CH_CTL_SW_MASK;
   205			chan_control_set |= IMG_I2S_IN_CH_CTL_FW_MASK;
   206			break;
   207		case SNDRV_PCM_FORMAT_S16_LE:
   208			frame_size = 32;
   209			control_set |= IMG_I2S_IN_CTL_16PACK_MASK;
   210			chan_control_set |= IMG_I2S_IN_CH_CTL_16PACK_MASK;
   211			break;
   212		default:
   213			return -EINVAL;
   214		}
   215	
   216		if ((channels < 2) ||
   217				(channels > (i2s->max_i2s_chan * 2)) ||
   218				(channels % 2))
   219			return -EINVAL;
   220	
   221		control_set |= ((i2s_channels - 1) << IMG_I2S_IN_CTL_ACTIVE_CH_SHIFT);
   222	
   223		ret = img_i2s_in_check_rate(i2s, rate, frame_size,
   224				&bclk_filter_enable, &bclk_filter_value);
   225		if (ret < 0)
   226			return ret;
   227	
   228		if (bclk_filter_enable)
   229			chan_control_set |= IMG_I2S_IN_CH_CTL_FEN_MASK;
   230	
   231		if (bclk_filter_value)
   232			chan_control_set |= IMG_I2S_IN_CH_CTL_FMODE_MASK;
   233	
   234		control_mask = ~IMG_I2S_IN_CTL_16PACK_MASK &
   235				~IMG_I2S_IN_CTL_ACTIVE_CHAN_MASK;
   236	
 > 237		chan_control_mask = ~IMG_I2S_IN_CH_CTL_16PACK_MASK &
   238				~IMG_I2S_IN_CH_CTL_FEN_MASK &
   239				~IMG_I2S_IN_CH_CTL_FMODE_MASK &
   240				~IMG_I2S_IN_CH_CTL_SW_MASK &

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux