From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: Fabio Estevam <fabio.estevam@nxp.com>, alsa-devel@alsa-project.org
Subject: [PATCH 2/2] ASoC: tlv320aic3x: Use empty struct initializer
Date: Tue, 13 Feb 2018 17:35:36 -0200 [thread overview]
Message-ID: <1518550536-16279-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1518550536-16279-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@nxp.com>
{ 0 } only clears the first member of the structure.
The first member of the snd_soc_dapm_update struct is pointer,
so wrting 0 to a pointer results in the following sparse warning:
sound/soc/codecs/tlv320aic3x.c:175:47: warning: Using plain integer as NULL pointer
Use the empty struct initializer that clears all the struct members
and fixes the sparse warning.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
sound/soc/codecs/tlv320aic3x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index dbfa0d8..6a271e6 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -172,7 +172,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
unsigned int mask = (1 << fls(max)) - 1;
unsigned int invert = mc->invert;
unsigned short val;
- struct snd_soc_dapm_update update = { 0 };
+ struct snd_soc_dapm_update update = {};
int connect, change;
val = (ucontrol->value.integer.value[0] & mask);
--
2.7.4
next prev parent reply other threads:[~2018-02-13 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 19:35 [PATCH 1/2] ASoC: wm9712: Use empty struct initializer Fabio Estevam
2018-02-13 19:35 ` Fabio Estevam [this message]
2018-02-14 13:29 ` Applied "ASoC: tlv320aic3x: Use empty struct initializer" to the asoc tree Mark Brown
2018-02-14 9:33 ` [PATCH 1/2] ASoC: wm9712: Use empty struct initializer Charles Keepax
2018-02-14 13:29 ` Applied "ASoC: wm9712: Use empty struct initializer" to the asoc tree 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=1518550536-16279-2-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fabio.estevam@nxp.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;
as well as URLs for NNTP newsgroup(s).