Skip to contentSkip to conversation

ALSA: remove unused loop_count variable

PATCH Applied Tom Rix 2 participants 2 messages Mar 26, 2023 – Mar 29, 2023 Sound

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 ALSA: remove unused loop_count variable

clang with W=1 reports sound/pci/asihpi/hpi6000.c:1256:6: error: variable
'loop_count' set but not used [-Werror,-Wunused-but-set-variable]

        u32 loop_count = 0;
            ^

This variable is not used so remove it.

---
 sound/pci/asihpi/hpi6000.c | 2 --
 1 file changed, 2 deletions(-)
sound/pci/asihpi/hpi6000.c +0 -2
index 88d902997b74..72aa135d69f8 100644
@@ -1253,7 +1253,6 @@ static u16 hpi6000_dsp_block_read32(struct hpi_adapter_obj *pao,
 	int local_count = count;
 	int xfer_size;
 	u32 *pdata = dest;
-	u32 loop_count = 0;
 
 	while (local_count) {
 		if (local_count > c6711_burst_size)
@@ -1273,7 +1272,6 @@ static u16 hpi6000_dsp_block_read32(struct hpi_adapter_obj *pao,
 		pdata += xfer_size;
 		local_hpi_address += sizeof(u32) * xfer_size;
 		local_count -= xfer_size;
-		loop_count++;
 	}
 
 	if (time_out)
Signature · 1 line
2.27.0
Applied
#1 lore raw
Quoted 9 lines · Tom Rix

clang with W=1 reports sound/pci/asihpi/hpi6000.c:1256:6: error: variable
'loop_count' set but not used [-Werror,-Wunused-but-set-variable]

        u32 loop_count = 0;
            ^

This variable is not used so remove it.

Applied, thanks.

Takashi