From nobody Sun May 5 07:20:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFDEEC433F5 for ; Fri, 30 Sep 2022 11:06:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232078AbiI3LGg (ORCPT ); Fri, 30 Sep 2022 07:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbiI3LGN (ORCPT ); Fri, 30 Sep 2022 07:06:13 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115FFE4D84 for ; Fri, 30 Sep 2022 03:43:09 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mf6B96s3RzHtqt; Fri, 30 Sep 2022 18:37:37 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 From: Chen Zhongjin To: , CC: , , , , Subject: [PATCH -next 1/4] ALSA: rawmidi: Remove unused variable 'dest_frames' Date: Fri, 30 Sep 2022 18:38:33 +0800 Message-ID: <20220930103836.104113-2-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220930103836.104113-1-chenzhongjin@huawei.com> References: <20220930103836.104113-1-chenzhongjin@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reported by Clang [-Wunused-but-set-variable] 'commit 08fdced60ca0 ("ALSA: rawmidi: Add framing mode")' This commit introduced the variable 'dest_frames'. However this variable was never used except iterates itself. It seems that it's some undeleted debug code. Remove it for code cleaning. Signed-off-by: Chen Zhongjin --- sound/core/rawmidi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 6963d5a487b3..3cd944386e51 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -1050,7 +1050,6 @@ static int receive_with_tstamp_framing(struct snd_raw= midi_substream *substream, struct snd_rawmidi_runtime *runtime =3D substream->runtime; struct snd_rawmidi_framing_tstamp *dest_ptr; struct snd_rawmidi_framing_tstamp frame =3D { .tv_sec =3D tstamp->tv_sec,= .tv_nsec =3D tstamp->tv_nsec }; - int dest_frames =3D 0; int orig_count =3D src_count; int frame_size =3D sizeof(struct snd_rawmidi_framing_tstamp); =20 @@ -1077,7 +1076,6 @@ static int receive_with_tstamp_framing(struct snd_raw= midi_substream *substream, runtime->avail +=3D frame_size; runtime->hw_ptr +=3D frame_size; runtime->hw_ptr %=3D runtime->buffer_size; - dest_frames++; } return orig_count - src_count; } --=20 2.17.1 From nobody Sun May 5 07:20:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD440C433FE for ; Fri, 30 Sep 2022 11:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbiI3LGx (ORCPT ); Fri, 30 Sep 2022 07:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbiI3LGV (ORCPT ); Fri, 30 Sep 2022 07:06:21 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C2F9C1E99 for ; Fri, 30 Sep 2022 03:43:10 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Mf6Bm5rdwz1P74c; Fri, 30 Sep 2022 18:38:08 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 From: Chen Zhongjin To: , CC: , , , , Subject: [PATCH -next 2/4] ALSA: cs5535audio: Remove unused variable 'loop' Date: Fri, 30 Sep 2022 18:38:34 +0800 Message-ID: <20220930103836.104113-3-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220930103836.104113-1-chenzhongjin@huawei.com> References: <20220930103836.104113-1-chenzhongjin@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reported by Clang [-Wunused-but-set-variable] The variable 'loop' is introduced to print log but this commit 'commit a6477134db11 ("ALSA: asihpi: Update debug printing")' had updated the printing and 'loop' was not printed. Now the variable is not used by other code. Remove it for code cleaning. Signed-off-by: Chen Zhongjin --- sound/pci/asihpi/asihpi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index 5e1f9f10051b..7041c2cba564 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c @@ -725,7 +725,6 @@ static void snd_card_asihpi_timer_function(struct timer= _list *t) unsigned int pcm_buf_dma_ofs, min_buf_pos =3D 0; unsigned int remdata, xfercount, next_jiffies; int first =3D 1; - int loops =3D 0; u16 state; u32 buffer_size, bytes_avail, samples_played, on_card_bytes; char name[16]; @@ -806,7 +805,6 @@ static void snd_card_asihpi_timer_function(struct timer= _list *t) (unsigned long)frames_to_bytes(runtime, runtime->control->appl_ptr) ); - loops++; } pcm_buf_dma_ofs =3D min_buf_pos; =20 --=20 2.17.1 From nobody Sun May 5 07:20:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22F1DC433FE for ; Fri, 30 Sep 2022 11:07:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231226AbiI3LHB (ORCPT ); Fri, 30 Sep 2022 07:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231722AbiI3LGW (ORCPT ); Fri, 30 Sep 2022 07:06:22 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A51C149B for ; Fri, 30 Sep 2022 03:43:16 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Mf6F43xJ2zHqWY; Fri, 30 Sep 2022 18:40:08 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 From: Chen Zhongjin To: , CC: , , , , Subject: [PATCH -next 3/4] ALSA: cs5535audio: Remove unused variable 'loop_count' Date: Fri, 30 Sep 2022 18:38:35 +0800 Message-ID: <20220930103836.104113-4-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220930103836.104113-1-chenzhongjin@huawei.com> References: <20220930103836.104113-1-chenzhongjin@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reported by Clang [-Wunused-but-set-variable] The variable 'loop_count' is introduced in this commit 'commit 719f82d3987a ("ALSA: Add support of AudioScience ASI boards")' However, since introduced it had never been used. Remove it for code cleaning Signed-off-by: Chen Zhongjin --- 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_adapte= r_obj *pao, int local_count =3D count; int xfer_size; u32 *pdata =3D dest; - u32 loop_count =3D 0; =20 while (local_count) { if (local_count > c6711_burst_size) @@ -1273,7 +1272,6 @@ static u16 hpi6000_dsp_block_read32(struct hpi_adapte= r_obj *pao, pdata +=3D xfer_size; local_hpi_address +=3D sizeof(u32) * xfer_size; local_count -=3D xfer_size; - loop_count++; } =20 if (time_out) --=20 2.17.1 From nobody Sun May 5 07:20:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9640FC433FE for ; Fri, 30 Sep 2022 11:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232428AbiI3LGz (ORCPT ); Fri, 30 Sep 2022 07:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231705AbiI3LGV (ORCPT ); Fri, 30 Sep 2022 07:06:21 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5510C10EEE0 for ; Fri, 30 Sep 2022 03:43:10 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Mf6DK3j4kzpVML; Fri, 30 Sep 2022 18:39:29 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 18:42:27 +0800 From: Chen Zhongjin To: , CC: , , , , Subject: [PATCH -next 4/4] ALSA: cs5535audio: Remove unused variable 'desc_addr' Date: Fri, 30 Sep 2022 18:38:36 +0800 Message-ID: <20220930103836.104113-5-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220930103836.104113-1-chenzhongjin@huawei.com> References: <20220930103836.104113-1-chenzhongjin@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reported by Clang [-Wunused-but-set-variable] The variable 'desc_addr' is introduced in this commit 'commit 9b4ffa48ae85 ("[ALSA] Add support for the CS5535 Audio device")' However, since introduced it was just iterated and never been used. Remove it for code cleaning. Signed-off-by: Chen Zhongjin --- 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/cs5535audi= o/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 cs5535a= udio *cs5535au, unsigned int period_bytes) { unsigned int i; - u32 addr, desc_addr, jmpprd_addr; + u32 addr, jmpprd_addr; struct cs5535audio_dma_desc *lastdesc; =20 if (periods > CS5535AUDIO_MAX_DESCRIPTORS) @@ -131,14 +131,12 @@ static int cs5535audio_build_dma_packets(struct cs553= 5audio *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 =3D (u32) substream->runtime->dma_addr; - desc_addr =3D (u32) dma->desc_buf.addr; for (i =3D 0; i < periods; i++) { struct cs5535audio_dma_desc *desc =3D &((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i]; desc->addr =3D cpu_to_le32(addr); desc->size =3D cpu_to_le16(period_bytes); desc->ctlreserved =3D cpu_to_le16(PRD_EOP); - desc_addr +=3D sizeof(struct cs5535audio_dma_desc); addr +=3D period_bytes; } /* we reserved one dummy descriptor at the end to do the PRD jump */ --=20 2.17.1