ALSA: cs5535audio: Remove the redundant assignment
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Mon, 7 Nov 2022 06:35:54 +0000 (14:35 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Nov 2022 08:16:31 +0000 (09:16 +0100)
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>
Link: https://lore.kernel.org/r/20221107063554.17933-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/cs5535audio/cs5535audio_pcm.c

index 0db24cc4d9167cc7d21d9eaac82659b09dadaee4..9c88e99e3750d59c6c75f11ef313ff4518eb592a 100644 (file)
@@ -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 */