From: Mark Brown <broonie@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@kernel.org>, Mark Brown <broonie@kernel.org>,
alsa-devel@alsa-project.org,
Charles Keepax <ckeepax@opensource.cirrus.com>,
anish kumar <yesanishhere@gmail.com>,
linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
alsa-devel@alsa-project.org
Subject: Applied "ASoC: dapm: add initialization for w_param_text pointer" to the asoc tree
Date: Tue, 10 Oct 2017 10:30:57 +0100 [thread overview]
Message-ID: <E1e1qsL-0004qV-F0@debutante> (raw)
In-Reply-To: <20171010092052.2551973-1-arnd@arndb.de>
The patch
ASoC: dapm: add initialization for w_param_text pointer
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 667ebc97c99a2ea9279bf3fdd791d97adfafbbc2 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 10 Oct 2017 11:20:10 +0200
Subject: [PATCH] ASoC: dapm: add initialization for w_param_text pointer
We now allocate the array conditionally, but we always pass
the pointer to the new snd_soc_dapm_free_kcontrol() function,
which introduces a warning for the case that it is not
initialized:
sound/soc/soc-dapm.c: In function 'snd_soc_dapm_new_pcm':
sound/soc/soc-dapm.c:3940:2: error: 'w_param_text' may be used uninitialized in this function [-Werror=maybe-uninitialized]
As snd_soc_dapm_free_kcontrol() is global, it doesn't get inlined
and gcc fails to notice that we don't actually access the array
in that case, so the code is actually safe. Adding an initialization
for the array pointer shuts up the warning.
Fixes: 19ad683abc85 ("ASoC: dapm: Avoid creating kcontrol for params")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/soc-dapm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 44aed3383c62..12eb74d5f5c1 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3905,6 +3905,8 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
ret = -ENOMEM;
goto param_fail;
}
+ } else {
+ w_param_text = NULL;
}
dev_dbg(card->dev, "ASoC: adding %s widget\n", link_name);
--
2.14.1
prev parent reply other threads:[~2017-10-10 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 9:20 [PATCH 1/2] ASoC: dapm: add initialization for w_param_text pointer Arnd Bergmann
2017-10-10 9:20 ` [PATCH 2/2] ASoC: dapm: mark 'snd_soc_dapm_free_kcontrol' as static Arnd Bergmann
2017-10-10 9:30 ` Applied "ASoC: dapm: mark 'snd_soc_dapm_free_kcontrol' as static" to the asoc tree Mark Brown
2017-10-10 9:30 ` Mark Brown [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=E1e1qsL-0004qV-F0@debutante \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=yesanishhere@gmail.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
all inboxes | Powered by JetHome®