From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Timur Tabi <timur@kernel.org>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Shengjiu Wang <shengjiu.wang@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
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 [thread overview]
Message-ID: <20210219232937.6440-3-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210219232937.6440-1-pierre-louis.bossart@linux.intel.com>
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 <pierre-louis.bossart@linux.intel.com>
---
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
next prev parent reply other threads:[~2021-02-19 23:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 23:29 [PATCH 0/9] ASoC: fsl: remove cppcheck warnings Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 1/9] ASoC: fsl: fsl_asrc: remove useless assignment Pierre-Louis Bossart
2021-02-19 23:29 ` Pierre-Louis Bossart [this message]
2021-02-19 23:29 ` [PATCH 3/9] ASoC: fsl: fsl_easrc: remove useless assignments Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 4/9] ASoC: fsl: fsl_esai: clarify expression Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 5/9] ASoC: fsl: fsl_ssi: remove unnecessary tests Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 6/9] ASoC: fsl: imx-hdmi: remove unused structure members Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 7/9] ASoC: fsl: mpc5200: signed parameter in snprintf format Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 8/9] ASoC: fsl: mpc8610: remove useless assignment Pierre-Louis Bossart
2021-02-19 23:29 ` [PATCH 9/9] ASoC: fsl: p1022_ds: " Pierre-Louis Bossart
2021-03-01 23:34 ` [PATCH 0/9] ASoC: fsl: remove cppcheck warnings Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210219232937.6440-3-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=shengjiu.wang@gmail.com \
--cc=timur@kernel.org \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).