From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1182AC433DB for ; Fri, 19 Feb 2021 23:32:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE84364EB4 for ; Fri, 19 Feb 2021 23:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbhBSXcU (ORCPT ); Fri, 19 Feb 2021 18:32:20 -0500 Received: from mga05.intel.com ([192.55.52.43]:58073 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbhBSXcR (ORCPT ); Fri, 19 Feb 2021 18:32:17 -0500 IronPort-SDR: DLC6qMdI8H04qq7rjWrZ86GmIT+ljWLORorXZsmVlhMiJdKC97DZ9Ssp/jPHCJp9oj3BQDpwmB UDPEtEeYM9bQ== X-IronPort-AV: E=McAfee;i="6000,8403,9900"; a="268854804" X-IronPort-AV: E=Sophos;i="5.81,191,1610438400"; d="scan'208";a="268854804" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 15:30:31 -0800 IronPort-SDR: 7fuqsnI5d1rCvsuQB4y1W5hbfpKOGWCfTShDcjfpVFCd5QXr4Iz+Qk/IQP3w6Hz/3gQt/vBW90 NOgGQyVei+hg== X-IronPort-AV: E=Sophos;i="5.81,191,1610438400"; d="scan'208";a="496662632" Received: from lkwerake-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.251.153.34]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 15:30:30 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Shengjiu Wang , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linuxppc-dev@lists.ozlabs.org (open list:FREESCALE SOC SOUND DRIVERS) Subject: [PATCH 2/9] ASoC: fsl: fsl_dma: remove unused variable Date: Fri, 19 Feb 2021 17:29:30 -0600 Message-Id: <20210219232937.6440-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210219232937.6440-1-pierre-louis.bossart@linux.intel.com> References: <20210219232937.6440-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cppcheck warning: sound/soc/fsl/fsl_dma.c:411:10: style: Variable 'channel' is assigned a value that is never used. [unreadVariable] channel = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1; ^ Removing this line shows the variable isn't needed any longer so remove declaration as well. Signed-off-by: Pierre-Louis Bossart --- sound/soc/fsl/fsl_dma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index e0c39c5f4854..84bd8a5356eb 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c @@ -392,7 +392,6 @@ static int fsl_dma_open(struct snd_soc_component *component, dma_addr_t ld_buf_phys; u64 temp_link; /* Pointer to next link descriptor */ u32 mr; - unsigned int channel; int ret = 0; unsigned int i; @@ -408,8 +407,6 @@ static int fsl_dma_open(struct snd_soc_component *component, return ret; } - channel = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1; - if (dma->assigned) { dev_err(dev, "dma channel already assigned\n"); return -EBUSY; -- 2.25.1