All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snawrocki@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH v2 6/6] ASoC: samsung: tm2_wm5510: remove shadowed variable
Date: Tue, 23 Feb 2021 20:24:10 +0100	[thread overview]
Message-ID: <bb9027c9-d4a4-4804-65e4-ee4932b404fc@kernel.org> (raw)
In-Reply-To: <CAJKOXPe2xjRd=zdCVkCLtY4cG2675Bh=-tqvnUNB3RocO5OSUw@mail.gmail.com>

On 23.02.2021 19:29, Krzysztof Kozlowski wrote:
> On Tue, 23 Feb 2021 at 19:20, Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
>> On 2/23/21 5:25 AM, Sylwester Nawrocki wrote:
>>> On 22.02.2021 22:33, Pierre-Louis Bossart wrote:
>>>> Move the top-level variable to the lower scope where it's needed.
>>>
>>> Actually I like your original patch better as there is really no need
>>> for multiple lower scope declarations in that fairly small function.
>>
>> I have no opinion, just let me know what the consensus is.
> 
> I proposed to have both variables local scope, to reduce the size of
> function-scope variables. Their number tends to grow in probe() a lot,
> so when a variable can be localized more, it makes the code easier to
> understand. No need to figure out who/where/when uses the variable.
> Local scope makes it much easier.

I don't have strong opinion, let's keep it local then as in current patch.


  reply	other threads:[~2021-02-23 19:25 UTC|newest]

Thread overview: 21+ 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-22 21:33   ` Pierre-Louis Bossart
2021-02-23 10:47   ` Sylwester Nawrocki
2021-02-23 10:47     ` Sylwester Nawrocki
2021-02-23 19:40   ` Krzysztof Kozlowski
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 ` [PATCH v2 6/6] ASoC: samsung: tm2_wm5510: remove shadowed variable Pierre-Louis Bossart
2021-02-23 11:25   ` Sylwester Nawrocki
2021-02-23 15:13     ` Pierre-Louis Bossart
2021-02-23 18:29       ` Krzysztof Kozlowski
2021-02-23 19:24         ` Sylwester Nawrocki [this message]
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=bb9027c9-d4a4-4804-65e4-ee4932b404fc@kernel.org \
    --to=snawrocki@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=krzk@kernel.org \
    --cc=pierre-louis.bossart@linux.intel.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.