alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: kbuild test robot <lkp@intel.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	kbuild-all@01.org
Subject: Re: [alsa-devel] [asoc:for-5.5 122/122] sound/soc/codecs/tas2562.c:195:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
Date: Fri, 11 Oct 2019 07:13:38 -0500	[thread overview]
Message-ID: <f6f9a0a1-2a24-300d-ef15-eb3f678f2f63@ti.com> (raw)
In-Reply-To: <201910110016.g5AIyc2E%lkp@intel.com>

Mark

On 10/10/19 11:41 AM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5
> head:   c173dba44c2d2ec2adaa4e607e9729b74236bd57
> commit: c173dba44c2d2ec2adaa4e607e9729b74236bd57 [122/122] ASoC: tas2562: Introduce the TAS2562 amplifier
> reproduce:
>          # apt-get install sparse
>          # sparse version: v0.6.1-rc1-42-g38eda53-dirty
>          git checkout c173dba44c2d2ec2adaa4e607e9729b74236bd57
>          make ARCH=x86_64 allmodconfig
>          make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> sound/soc/codecs/tas2562.c:195:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>     sound/soc/codecs/tas2562.c:202:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>     sound/soc/codecs/tas2562.c:209:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>>> sound/soc/codecs/tas2562.c:246:58: sparse: sparse: incorrect type in argument 2 (different base types) @@    expected int bitwidth @@    got restricted snd_pcm_formint bitwidth @@
>>> sound/soc/codecs/tas2562.c:246:58: sparse:    expected int bitwidth
>>> sound/soc/codecs/tas2562.c:246:58: sparse:    got restricted snd_pcm_format_t
>     sound/soc/codecs/tas2562.c:472:39: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>
> vim +195 sound/soc/codecs/tas2562.c
>
>     189	
>     190	static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)

The only fix I can see here is to change bitwidth to snd_pcm_format_t as 
opposed to an integer.

But that still gives this sparse warning.  The way the code below is 
written  to be consistent throughout the drivers so are these warnings 
false positives?

I get similar ones for the tas2770 as well

Dan


>     191	{
>     192		int ret;
>     193	
>     194		switch (bitwidth) {
>   > 195		case SNDRV_PCM_FORMAT_S16_LE:
> <snip>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-10-11 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 16:41 [alsa-devel] [asoc:for-5.5 122/122] sound/soc/codecs/tas2562.c:195:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer kbuild test robot
2019-10-11 12:13 ` Dan Murphy [this message]
2019-10-21 19:19   ` Mark Brown
2019-10-22  0:17     ` [alsa-devel] [kbuild-all] " Rong Chen
2019-10-22  5:08     ` [alsa-devel] " Takashi Iwai

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=f6f9a0a1-2a24-300d-ef15-eb3f678f2f63@ti.com \
    --to=dmurphy@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).