From: kbuild test robot <lkp@intel.com>
To: Damien Horsley <Damien.Horsley@imgtec.com>
Cc: kbuild-all@01.org, alsa-devel@alsa-project.org,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Kumar Gala <galak@codeaurora.org>,
"Damien.Horsley" <Damien.Horsley@imgtec.com>
Subject: Re: [alsa-devel] [PATCH 04/10] ASoC: img: Add driver for I2S output controller
Date: Wed, 30 Sep 2015 23:42:23 +0800 [thread overview]
Message-ID: <201509302349.xFtKo249%fengguang.wu@intel.com> (raw)
In-Reply-To: <1443625696-29296-5-git-send-email-Damien.Horsley@imgtec.com>
[-- 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 --]
next parent reply other threads:[~2015-09-30 15:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1443625696-29296-5-git-send-email-Damien.Horsley@imgtec.com>
2015-09-30 15:42 ` kbuild test robot [this message]
2015-09-30 18:13 ` kbuild test robot
2015-09-30 18:34 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201509302349.xFtKo249%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=Damien.Horsley@imgtec.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kbuild-all@01.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®