From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH v2 6/6] ASoC: samsung: tm2_wm5510: remove shadowed variable
Date: Mon, 22 Feb 2021 15:33:06 -0600 [thread overview]
Message-ID: <20210222213306.22654-7-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210222213306.22654-1-pierre-louis.bossart@linux.intel.com>
cppcheck warning:
sound/soc/samsung/tm2_wm5110.c:552:26: style: Local variable 'args'
shadows outer variable [shadowVariable]
struct of_phandle_args args;
^
sound/soc/samsung/tm2_wm5110.c:504:25: note: Shadowed declaration
struct of_phandle_args args;
^
sound/soc/samsung/tm2_wm5110.c:552:26: note: Shadow variable
struct of_phandle_args args;
^
Move the top-level variable to the lower scope where it's needed.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/samsung/tm2_wm5110.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c
index 125e07f65d2b..84c2c63d5a87 100644
--- a/sound/soc/samsung/tm2_wm5110.c
+++ b/sound/soc/samsung/tm2_wm5110.c
@@ -501,7 +501,6 @@ static int tm2_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct snd_soc_card *card = &tm2_card;
struct tm2_machine_priv *priv;
- struct of_phandle_args args;
struct snd_soc_dai_link *dai_link;
int num_codecs, ret, i;
@@ -585,6 +584,8 @@ static int tm2_probe(struct platform_device *pdev)
}
if (num_codecs > 1) {
+ struct of_phandle_args args;
+
/* HDMI DAI link (I2S1) */
i = card->num_links - 1;
--
2.25.1
next prev parent reply other threads:[~2021-02-22 21:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 21:33 [PATCH v2 0/6] ASoC: samsung: remove cppcheck warnings Pierre-Louis Bossart
2021-02-22 21:33 ` [PATCH v2 1/6] ASoC: samsung: tm2_wm5510: fix check of of_parse return value Pierre-Louis Bossart
2021-02-23 10:47 ` Sylwester Nawrocki
2021-02-23 19:40 ` Krzysztof Kozlowski
2021-02-22 21:33 ` [PATCH v2 2/6] ASoC: samsung: i2s: remove unassigned variable Pierre-Louis Bossart
2021-02-23 10:54 ` Sylwester Nawrocki
2021-02-22 21:33 ` [PATCH v2 3/6] ASoC: samsung: s3c24xx_simtec: add missing error check Pierre-Louis Bossart
2021-02-23 10:57 ` Sylwester Nawrocki
2021-02-22 21:33 ` [PATCH v2 4/6] ASoC: samsung: smdk_wm8994: add missing return Pierre-Louis Bossart
2021-02-23 11:08 ` Sylwester Nawrocki
2021-02-22 21:33 ` [PATCH v2 5/6] ASoC: samsung: snow: remove useless test Pierre-Louis Bossart
2021-02-23 11:19 ` Sylwester Nawrocki
2021-02-22 21:33 ` Pierre-Louis Bossart [this message]
2021-02-23 11:25 ` [PATCH v2 6/6] ASoC: samsung: tm2_wm5510: remove shadowed variable Sylwester Nawrocki
2021-02-23 15:13 ` Pierre-Louis Bossart
2021-02-23 18:29 ` Krzysztof Kozlowski
2021-02-23 19:24 ` Sylwester Nawrocki
2021-02-23 19:41 ` Krzysztof Kozlowski
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=20210222213306.22654-7-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=krzk@kernel.org \
--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