All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH 4/8] ASoC: sh: rcar: core: rename shadowing variables
Date: Mon, 22 Feb 2021 09:41:11 -0600	[thread overview]
Message-ID: <03f560f1-2389-424d-5d4c-84e244baca1c@linux.intel.com> (raw)
In-Reply-To: <87wnv1vw6a.wl-kuninori.morimoto.gx@renesas.com>



On 2/21/21 5:27 PM, Kuninori Morimoto wrote:
> 
> Hi Pierre-Louis
> 
>> sound/soc/sh/rcar/core.c:1369:22: style: Local variable 'rdai' shadows
>> outer variable [shadowVariable]
>>      struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
>>                       ^
> 
> I'm not 100% sure about this warning,
> but this path is overkill. Maybe below is enough ?

Hi Morimoto-san,
It might be better if we drop this patch from the series and have you 
send the proper fix with my Reported-by tag.
Would that work for you?
Thanks!

> ---------
> diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
> index 8533aa696183..cae9639c0ef9 100644
> --- a/sound/soc/sh/rcar/core.c
> +++ b/sound/soc/sh/rcar/core.c
> @@ -1382,7 +1382,7 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
>   		for_each_endpoint_of_node(dai_node, dai_np) {
>   			__rsnd_dai_probe(priv, dai_np, dai_i);
>   			if (rsnd_is_gen3(priv)) {
> -				struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
> +				rdai = rsnd_rdai_get(priv, dai_i);
>   
>   				rsnd_parse_connect_graph(priv, &rdai->playback, dai_np);
>   				rsnd_parse_connect_graph(priv, &rdai->capture,  dai_np);
> @@ -1393,7 +1393,7 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
>   		for_each_child_of_node(dai_node, dai_np) {
>   			__rsnd_dai_probe(priv, dai_np, dai_i);
>   			if (rsnd_is_gen3(priv)) {
> -				struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
> +				rdai = rsnd_rdai_get(priv, dai_i);
>   
>   				rsnd_parse_connect_simple(priv, &rdai->playback, dai_np);
>   				rsnd_parse_connect_simple(priv, &rdai->capture,  dai_np);
> ----
> 
> Thank you for your help !!
> 
> Best regards
> ---
> Kuninori Morimoto
> 

  reply	other threads:[~2021-02-22 16:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 23:16 [PATCH 0/8] ASoC: sh: remove cppcheck warnings Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 1/8] ASoC: sh: dma-sh7760: remove unused variable Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 2/8] ASoC: sh: rcar: align function prototypes Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 3/8] ASoC: sh: rcar: simplify return Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 4/8] ASoC: sh: rcar: core: rename shadowing variables Pierre-Louis Bossart
2021-02-21 23:27   ` Kuninori Morimoto
2021-02-22 15:41     ` Pierre-Louis Bossart [this message]
2021-02-24 23:13       ` Kuninori Morimoto
2021-02-19 23:16 ` [PATCH 5/8] ASoC: sh: rcar: ctu: add missing error check Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 6/8] ASoC: sh: rcar: ssi: remove redundant assignment Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 7/8] ASoC: sh: siu_pcm: remove useless assignment Pierre-Louis Bossart
2021-02-19 23:16 ` [PATCH 8/8] ASoC: sh: siu_pcm: remove unused variable Pierre-Louis Bossart
2021-02-21 23:32 ` [PATCH 0/8] ASoC: sh: remove cppcheck warnings Kuninori Morimoto
2021-03-01 23:34 ` (subset) " 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=03f560f1-2389-424d-5d4c-84e244baca1c@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.