From: Thierry Reding <thierry.reding@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: broonie@kernel.org, robh@kernel.org, lgirdwood@gmail.com,
jonathanh@nvidia.com, ndesaulniers@google.com, trix@redhat.com,
alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org,
llvm@lists.linux.dev, patches@lists.linux.dev
Subject: Re: [PATCH] ASoC: tegra: Fix -Wuninitialized in tegra210_amx_platform_probe()
Date: Thu, 12 Oct 2023 20:05:00 +0200 [thread overview]
Message-ID: <ZSg1TEvIMu2qDzhm@orome.fritz.box> (raw)
In-Reply-To: <20231011-asoc-tegra-fix-uninit-soc_data-v1-1-0ef0ab44cf48@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
On Wed, Oct 11, 2023 at 01:21:51PM -0700, Nathan Chancellor wrote:
> Clang warns (or errors with CONFIG_WERROR=y):
>
> sound/soc/tegra/tegra210_amx.c:553:10: error: variable 'soc_data' is uninitialized when used here [-Werror,-Wuninitialized]
> 553 | soc_data->regmap_conf);
> | ^~~~~~~~
>
> A refactoring removed the initialization of this variable but its use
> was not updated. Use the soc_data value in the amx variable to resolve
> the warning and remove the soc_data variable, as it is now entirely
> unused.
>
> Closes: https://github.com/ClangBuiltLinux/linux/issues/1943
> Fixes: 9958d85968ed ("ASoC: Use device_get_match_data()")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> sound/soc/tegra/tegra210_amx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
I see that Mark was quicker and this is already applied, but just for
the record, this fixes an OOPS that I started seeing recently but hadn't
gotten around to look at more closely, so I guess:
Tested-by: Thierry Reding <treding@nvidia.com>
And thanks!
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-10-12 18:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 20:21 [PATCH] ASoC: tegra: Fix -Wuninitialized in tegra210_amx_platform_probe() Nathan Chancellor
2023-10-12 17:42 ` Mark Brown
2023-10-12 18:05 ` Thierry Reding [this message]
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=ZSg1TEvIMu2qDzhm@orome.fritz.box \
--to=thierry.reding@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-tegra@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=patches@lists.linux.dev \
--cc=robh@kernel.org \
--cc=trix@redhat.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