llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: remove unused loop_count variable
@ 2023-03-26 20:57 Tom Rix
  2023-03-29 12:41 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-26 20:57 UTC (permalink / raw)
  To: perex, tiwai, nathan, ndesaulniers, wangjianli
  Cc: alsa-devel, linux-kernel, llvm, 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.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 sound/pci/asihpi/hpi6000.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c
index 88d902997b74..72aa135d69f8 100644
--- a/sound/pci/asihpi/hpi6000.c
+++ b/sound/pci/asihpi/hpi6000.c
@@ -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)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: remove unused loop_count variable
  2023-03-26 20:57 [PATCH] ALSA: remove unused loop_count variable Tom Rix
@ 2023-03-29 12:41 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-03-29 12:41 UTC (permalink / raw)
  To: Tom Rix
  Cc: perex, tiwai, nathan, ndesaulniers, wangjianli, alsa-devel,
	linux-kernel, llvm

On Sun, 26 Mar 2023 22:57:12 +0200,
Tom Rix wrote:
> 
> 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.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-29 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 20:57 [PATCH] ALSA: remove unused loop_count variable Tom Rix
2023-03-29 12:41 ` Takashi Iwai

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).