linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	M R Swami Reddy <mr.swami.reddy@ti.com>,
	Vishwas A Deshpande <vishwas.a.deshpande@ti.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: [RFC PATCH 1/2] ASoC: lm49453: fix useless assignment before return
Date: Fri, 26 Mar 2021 17:16:18 -0500	[thread overview]
Message-ID: <20210326221619.949961-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210326221619.949961-1-pierre-louis.bossart@linux.intel.com>

Cppcheck warning:

sound/soc/codecs/lm49453.c:1210:11: style: Variable 'pll_clk' is
assigned a value that is never used. [unreadVariable]

  pll_clk = BIT(4);
          ^

FIXME: What is the correct fix?
	/* fll clk slection */
	pll_clk = BIT(4);
	return 0;

is the assignment redundant or the 'return 0' a mistake?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/lm49453.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index eb3dd0bd80d9..fb0fb23537e7 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -1206,8 +1206,6 @@ static int lm49453_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
 		break;
 	case 48000:
 	case 32576:
-		/* fll clk slection */
-		pll_clk = BIT(4);
 		return 0;
 	default:
 		return -EINVAL;
-- 
2.25.1


  reply	other threads:[~2021-03-26 23:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 22:16 [RFC PATCH 0/2] ASoC: remove cppchecks warnings on lm49453 and da732x Pierre-Louis Bossart
2021-03-26 22:16 ` Pierre-Louis Bossart [this message]
2021-03-26 22:16 ` [RFC PATCH 2/2] ASoC: da732x: simplify code Pierre-Louis Bossart
2021-04-15 16:00   ` Adam Thomson
2021-04-15 16:04     ` Mark Brown
2021-04-15 16:09       ` Adam Thomson
2021-04-01 10:16 ` [RFC PATCH 0/2] ASoC: remove cppchecks warnings on lm49453 and da732x 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=20210326221619.949961-2-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mr.swami.reddy@ti.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    --cc=vishwas.a.deshpande@ti.com \
    /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).