Skip to content

Commit d59b6f2

Browse files
Jiapeng Chongtiwai
authored andcommitted
ALSA: cs5535audio: Remove the redundant assignment
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 <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 2b4e275 commit d59b6f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sound/pci/cs5535audio/cs5535audio_pcm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
110110
unsigned int period_bytes)
111111
{
112112
unsigned int i;
113-
u32 addr, desc_addr, jmpprd_addr;
113+
u32 addr, jmpprd_addr;
114114
struct cs5535audio_dma_desc *lastdesc;
115115

116116
if (periods > CS5535AUDIO_MAX_DESCRIPTORS)
@@ -131,14 +131,12 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
131131
/* the u32 cast is okay because in snd*create we successfully told
132132
pci alloc that we're only 32 bit capable so the upper will be 0 */
133133
addr = (u32) substream->runtime->dma_addr;
134-
desc_addr = (u32) dma->desc_buf.addr;
135134
for (i = 0; i < periods; i++) {
136135
struct cs5535audio_dma_desc *desc =
137136
&((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
138137
desc->addr = cpu_to_le32(addr);
139138
desc->size = cpu_to_le16(period_bytes);
140139
desc->ctlreserved = cpu_to_le16(PRD_EOP);
141-
desc_addr += sizeof(struct cs5535audio_dma_desc);
142140
addr += period_bytes;
143141
}
144142
/* we reserved one dummy descriptor at the end to do the PRD jump */

0 commit comments

Comments
 (0)