From: Nathan Chancellor <nathan@kernel.org>
To: broonie@kernel.org, pierre-louis.bossart@linux.intel.com,
lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com,
yung-chuan.liao@linux.intel.com,
ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com
Cc: kai.vehmanen@linux.intel.com, ndesaulniers@google.com,
trix@redhat.com, rander.wang@intel.com,
sound-open-firmware@alsa-project.org,
alsa-devel@alsa-project.org, llvm@lists.linux.dev,
patches@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH] ASoC: SOF: Intel: Initialize chip in hda_sdw_check_wakeen_irq()
Date: Wed, 09 Aug 2023 11:12:07 -0700 [thread overview]
Message-ID: <20230809-intel-hda-missing-chip-init-v1-1-61557ca6fa8a@kernel.org> (raw)
Clang warns (or errors with CONFIG_WERROR):
sound/soc/sof/intel/hda.c:423:6: error: variable 'chip' is uninitialized when used here [-Werror,-Wuninitialized]
423 | if (chip && chip->check_sdw_wakeen_irq)
| ^~~~
sound/soc/sof/intel/hda.c:418:39: note: initialize the variable 'chip' to silence this warning
418 | const struct sof_intel_dsp_desc *chip;
| ^
| = NULL
1 error generated.
Add the missing initialization, following the pattern of the other irq
functions.
Fixes: 9362ab78f175 ("ASoC: SOF: Intel: add abstraction for SoundWire wake-ups")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
sound/soc/sof/intel/hda.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 04c748a72b13..15e6779efaa3 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -420,6 +420,7 @@ static bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev)
if (!(interface_mask & BIT(SOF_DAI_INTEL_ALH)))
return false;
+ chip = get_chip_info(sdev->pdata);
if (chip && chip->check_sdw_wakeen_irq)
return chip->check_sdw_wakeen_irq(sdev);
---
base-commit: 59146c3cd326a622e9041614842346aada11ca99
change-id: 20230809-intel-hda-missing-chip-init-dcccbe6365a4
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
next reply other threads:[~2023-08-09 18:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 18:12 Nathan Chancellor [this message]
2023-08-09 18:41 ` [PATCH] ASoC: SOF: Intel: Initialize chip in hda_sdw_check_wakeen_irq() Pierre-Louis Bossart
2023-08-09 19:02 ` Nathan Chancellor
2023-08-09 19:57 ` Pierre-Louis Bossart
2023-08-09 20:09 ` Nathan Chancellor
2023-08-09 20:42 ` Pierre-Louis Bossart
2023-08-10 14:33 ` Nathan Chancellor
2023-08-10 11:39 ` 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=20230809-intel-hda-missing-chip-init-v1-1-61557ca6fa8a@kernel.org \
--to=nathan@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=ndesaulniers@google.com \
--cc=patches@lists.linux.dev \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rander.wang@intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=trix@redhat.com \
--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.