All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: adau17x1: Use empty struct initializer
@ 2018-02-14 15:39 Fabio Estevam
  2018-02-14 15:39 ` [PATCH 2/3] ASoC: wm9713: " Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Fabio Estevam @ 2018-02-14 15:39 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

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 a pointer,
and writing 0 to a pointer results in a sparse warning.

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/adau17x1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c
index df34349..80c2a06 100644
--- a/sound/soc/codecs/adau17x1.c
+++ b/sound/soc/codecs/adau17x1.c
@@ -181,7 +181,7 @@ static int adau17x1_dsp_mux_enum_put(struct snd_kcontrol *kcontrol,
 	struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
 	struct adau *adau = snd_soc_component_get_drvdata(component);
 	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
-	struct snd_soc_dapm_update update = { 0 };
+	struct snd_soc_dapm_update update = {};
 	unsigned int stream = e->shift_l;
 	unsigned int val, change;
 	int reg;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-02-14 17:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 15:39 [PATCH 1/3] ASoC: adau17x1: Use empty struct initializer Fabio Estevam
2018-02-14 15:39 ` [PATCH 2/3] ASoC: wm9713: " Fabio Estevam
2018-02-14 15:48   ` Charles Keepax
2018-02-14 16:28   ` Applied "ASoC: wm9713: Use empty struct initializer" to the asoc tree Mark Brown
2018-02-14 16:41   ` [PATCH 2/3] ASoC: wm9713: Use empty struct initializer Richard Fitzgerald
2018-02-14 16:49     ` Fabio Estevam
2018-02-14 16:51       ` Fabio Estevam
2018-02-14 16:56       ` Richard Fitzgerald
2018-02-14 17:01         ` Fabio Estevam
2018-02-14 17:15           ` Richard Fitzgerald
2018-02-14 17:19             ` Fabio Estevam
2018-02-14 15:39 ` [PATCH 3/3] ASoC: soc-dapm: " Fabio Estevam
2018-02-14 16:28   ` Applied "ASoC: soc-dapm: Use empty struct initializer" to the asoc tree Mark Brown
2018-02-14 16:28 ` Applied "ASoC: adau17x1: " Mark Brown

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.