From: Wang Yufen <wangyufen@huawei.com>
To: <cezary.rojewski@intel.com>,
<pierre-louis.bossart@linux.intel.com>,
<liam.r.girdwood@linux.intel.com>,
<peter.ujfalusi@linux.intel.com>,
<yung-chuan.liao@linux.intel.com>,
<ranjani.sridharan@linux.intel.com>,
<kai.vehmanen@linux.intel.com>, <broonie@kernel.org>,
<perex@perex.cz>, <tiwai@suse.com>, <alsa-devel@alsa-project.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [-next] ASoC: Intel: fix compiler warning of function ‘probe_codec’
Date: Tue, 13 Sep 2022 18:02:00 +0800 [thread overview]
Message-ID: <1663063320-29158-1-git-send-email-wangyufen@huawei.com> (raw)
Move the variable ‘skl’ define to
CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC enabled, to fix the compiler
warning:
sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
sound/soc/intel/skylake/skl.c:729:18: warning: unused variable ‘skl’ [-Wunused-variable]
729 | struct skl_dev *skl = bus_to_skl(bus);
| ^~~
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
---
sound/soc/intel/skylake/skl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index c7c1cad..52a041d 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -726,8 +726,8 @@ static int probe_codec(struct hdac_bus *bus, int addr)
unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) |
(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
unsigned int res = -1;
- struct skl_dev *skl = bus_to_skl(bus);
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC)
+ struct skl_dev *skl = bus_to_skl(bus);
struct hdac_hda_priv *hda_codec;
#endif
struct hda_codec *codec;
--
1.8.3.1
next reply other threads:[~2022-09-13 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 10:02 Wang Yufen [this message]
2022-09-13 14:06 ` Cezary Rojewski
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=1663063320-29158-1-git-send-email-wangyufen@huawei.com \
--to=wangyufen@huawei.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=tiwai@suse.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 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®