All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	broonie@kernel.org, "Bard Liao" <yung-chuan.liao@linux.intel.com>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 09/16] ASoC: Intel: boards: reset acpi_chan_package
Date: Fri, 20 May 2022 16:17:12 -0500	[thread overview]
Message-ID: <20220520211719.607543-10-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com>

cppcheck complains about possible tests of uninitialized 'aif_value'
members. This isn't really possible but static analysis cannot know
what ACPICA does, so make sure the acpi_chan_package structure is
reset prior to use to make the warning go away.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5640.c   | 2 +-
 sound/soc/intel/boards/bytcr_rt5651.c   | 2 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 7b948a219177d..7cc85fd862b21 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -1634,7 +1634,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
 		 * with the codec driver/pdata are non-existent
 		 */
 
-		struct acpi_chan_package chan_package;
+		struct acpi_chan_package chan_package = { 0 };
 
 		/* format specified: 2 64-bit integers */
 		struct acpi_buffer format = {sizeof("NN"), "NN"};
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index d467fcaa48eaa..03a52b1069a92 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -952,7 +952,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 		 * with the codec driver/pdata are non-existent
 		 */
 
-		struct acpi_chan_package chan_package;
+		struct acpi_chan_package chan_package = { 0 };
 
 		/* format specified: 2 64-bit integers */
 		struct acpi_buffer format = {sizeof("NN"), "NN"};
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 45c301ea5e003..453281326c831 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -603,7 +603,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 		 * with the codec driver/pdata are non-existent
 		 */
 
-		struct acpi_chan_package chan_package;
+		struct acpi_chan_package chan_package = { 0 };
 
 		/* format specified: 2 64-bit integers */
 		struct acpi_buffer format = {sizeof("NN"), "NN"};
-- 
2.30.2


  parent reply	other threads:[~2022-05-20 21:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 21:17 [PATCH 00/16] ASoC: trivial changes for cppcheck warnings Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 01/16] ASoC: cs35l45: typo in argument definition Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 02/16] ASoC: cs42l42: remove redundant test Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 03/16] ASoC: wcd-mbhc-v2: remove useless initialization Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 04/16] ASoC: wcd9335: remove redundant tests Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 05/16] ASoC: Intel: atom: sst: remove useless initialization Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 06/16] ASoC: Intel: atom: sst_ipc: remove redundant test Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 07/16] ASoC: Intel: atom: sst_ipc: remove useless initializations Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 08/16] ASoC: Intel: atom: controls: " Pierre-Louis Bossart
2022-05-20 21:17 ` Pierre-Louis Bossart [this message]
2022-05-20 21:17 ` [PATCH 10/16] ASoC: Intel: sof_pcm512x: remove unnecessary init Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 11/16] ASoC: mediatek: mt8195: simplify error handling Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 12/16] ASoC: qcom: q6dsp: q6adm: remove useless initializations Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 13/16] ASoC: qcom: q6dsp: remove spurious space Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 14/16] ASoC: rockchip: simplify error handling Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 15/16] ASoC: samsung: snow: " Pierre-Louis Bossart
2022-05-20 21:17 ` [PATCH 16/16] ASoC: meson: remove useless initialization Pierre-Louis Bossart
2022-06-07 10:55 ` [PATCH 00/16] ASoC: trivial changes for cppcheck warnings 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=20220520211719.607543-10-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.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 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.