From nobody Mon Feb 9 14:14:31 2026 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