From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: jayakumar.alsa@gmail.com
Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
alsa-devel@alsa-project.org,
Abaci Robot <abaci@linux.alibaba.com>,
linux-kernel@vger.kernel.org, tiwai@suse.com
Subject: [PATCH] ALSA: cs5535audio: Remove the redundant assignment
Date: Mon, 7 Nov 2022 14:35:54 +0800 [thread overview]
Message-ID: <20221107063554.17933-1-jiapeng.chong@linux.alibaba.com> (raw)
Variable 'desc_addr' set but not used.
sound/pci/cs5535audio/cs5535audio_pcm.c:113:12: warning: variable 'desc_addr' set but not used.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2739
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
sound/pci/cs5535audio/cs5535audio_pcm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c
index 0db24cc4d916..9c88e99e3750 100644
--- a/sound/pci/cs5535audio/cs5535audio_pcm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pcm.c
@@ -110,7 +110,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
unsigned int period_bytes)
{
unsigned int i;
- u32 addr, desc_addr, jmpprd_addr;
+ u32 addr, jmpprd_addr;
struct cs5535audio_dma_desc *lastdesc;
if (periods > CS5535AUDIO_MAX_DESCRIPTORS)
@@ -131,14 +131,12 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
/* the u32 cast is okay because in snd*create we successfully told
pci alloc that we're only 32 bit capable so the upper will be 0 */
addr = (u32) substream->runtime->dma_addr;
- desc_addr = (u32) dma->desc_buf.addr;
for (i = 0; i < periods; i++) {
struct cs5535audio_dma_desc *desc =
&((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
desc->addr = cpu_to_le32(addr);
desc->size = cpu_to_le16(period_bytes);
desc->ctlreserved = cpu_to_le16(PRD_EOP);
- desc_addr += sizeof(struct cs5535audio_dma_desc);
addr += period_bytes;
}
/* we reserved one dummy descriptor at the end to do the PRD jump */
--
2.20.1.7.g153144c
next reply other threads:[~2022-11-07 6:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 6:35 Jiapeng Chong [this message]
2022-11-07 8:18 ` [PATCH] ALSA: cs5535audio: Remove the redundant assignment 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=20221107063554.17933-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=alsa-devel@alsa-project.org \
--cc=jayakumar.alsa@gmail.com \
--cc=linux-kernel@vger.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