From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ian Minett <ian_minett@creativelabs.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org, kbuild@01.org
Subject: [sound:topic/hda-ca0132-dsp 4/11] sound/pci/hda/patch_ca0132.c:714 dspio_send() warn: always true condition '(res >= 0) => (0-u32max >= 0)'
Date: Mon, 17 Dec 2012 20:35:43 +0300 [thread overview]
Message-ID: <20121217173543.GU5083@mwanda> (raw)
Hi Ian,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/hda-ca0132-dsp
head: cdc83c59e59d57b250be46c4b9d31e3b2b5ae589
commit: 01ef7dbffb411d9d78d1150b268d9c757f9f2f93 [4/11] ALSA: hda - Update CA0132 codec to load DSP firmware binary
+ sound/pci/hda/patch_ca0132.c:714 dspio_send() warn: always true condition '(res >= 0) => (0-u32max >= 0)'
sound/pci/hda/patch_ca0132.c:1781 dspxfr_one_seg() info: why not propagate 'status' from dsp_dma_stop() instead of (-5)?
sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: potential null dereference 'dma_engine'. (kzalloc returns null)
sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: we previously assumed 'dma_engine' could be null (see line 1857)
git remote add sound git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
git remote update sound
git checkout 01ef7dbffb411d9d78d1150b268d9c757f9f2f93
vim +714 sound/pci/hda/patch_ca0132.c
01ef7dbf Ian Minett 2012-09-20 698 VENDOR_CHIPIO_PLL_PMU_WRITE, 0xff);
01ef7dbf Ian Minett 2012-09-20 699 mutex_unlock(&spec->chipio_mutex);
01ef7dbf Ian Minett 2012-09-20 700 }
01ef7dbf Ian Minett 2012-09-20 701
01ef7dbf Ian Minett 2012-09-20 702 /*
01ef7dbf Ian Minett 2012-09-20 703 * CA0132 DSP IO stuffs
01ef7dbf Ian Minett 2012-09-20 704 */
01ef7dbf Ian Minett 2012-09-20 705 static int dspio_send(struct hda_codec *codec, unsigned int reg,
01ef7dbf Ian Minett 2012-09-20 706 unsigned int data)
01ef7dbf Ian Minett 2012-09-20 707 {
01ef7dbf Ian Minett 2012-09-20 708 unsigned int res;
01ef7dbf Ian Minett 2012-09-20 709 int retry = 50;
01ef7dbf Ian Minett 2012-09-20 710
01ef7dbf Ian Minett 2012-09-20 711 /* send bits of data specified by reg to dsp */
01ef7dbf Ian Minett 2012-09-20 712 do {
01ef7dbf Ian Minett 2012-09-20 713 res = snd_hda_codec_read(codec, WIDGET_DSP_CTRL, 0, reg, data);
01ef7dbf Ian Minett 2012-09-20 @714 if ((res >= 0) && (res != VENDOR_STATUS_DSPIO_BUSY))
01ef7dbf Ian Minett 2012-09-20 715 return res;
01ef7dbf Ian Minett 2012-09-20 716 } while (--retry);
01ef7dbf Ian Minett 2012-09-20 717
01ef7dbf Ian Minett 2012-09-20 718 return -EIO;
01ef7dbf Ian Minett 2012-09-20 719 }
01ef7dbf Ian Minett 2012-09-20 720
01ef7dbf Ian Minett 2012-09-20 721 static void dspio_write_wait(struct hda_codec *codec)
01ef7dbf Ian Minett 2012-09-20 722 {
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
reply other threads:[~2012-12-17 17:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20121217173543.GU5083@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=ian_minett@creativelabs.com \
--cc=kbuild@01.org \
--cc=tiwai@suse.de \
/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).