From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: YueHaibing <yuehaibing@huawei.com>,
lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
arnd@arndb.de, flove@realtek.com, derek.fang@realtek.com,
shumingf@realtek.com, basavaraj.hiregoudar@amd.com,
Sunil-kumar.Dommati@amd.com, Alexander.Deucher@amd.com
Subject: Re: [PATCH -next] ASoC: amd: acp-da7219-max98357a: Fix -Wunused-variable warning
Date: Mon, 29 Mar 2021 23:07:06 +0530 [thread overview]
Message-ID: <56a58143-863b-b5e4-4498-1190bda3e6bb@amd.com> (raw)
In-Reply-To: <20210329145037.23756-1-yuehaibing@huawei.com>
On 3/29/21 8:20 PM, YueHaibing wrote:
> While ACPI is not set, make W=1 warns:
>
> sound/soc/amd/acp-da7219-max98357a.c:684:28: warning: ‘cz_rt5682_card’ defined but not used [-Wunused-variable]
> static struct snd_soc_card cz_rt5682_card = {
> ^~~~~~~~~~~~~~
> sound/soc/amd/acp-da7219-max98357a.c:671:28: warning: ‘cz_card’ defined but not used [-Wunused-variable]
> static struct snd_soc_card cz_card = {
>
> Use #ifdef block to guard this.
For similar kernel warnings, i have previously pushed patch adding ACPI
dependency.
But I got below review comment for my patch "[PATCH 2/2] ASoC: amd: fix
acpi dependency kernel warning" from Arnd
I would suggest simply dropping the unnecessary #ifdef and
ACPI_PTR() guard.
It might be helpful to hide the Kconfig submenu under
'depends on X86 || COMPILE_TEST'.
-
Vijendar
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> sound/soc/amd/acp-da7219-max98357a.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
> index e65e007fc604..1bf0458e22a8 100644
> --- a/sound/soc/amd/acp-da7219-max98357a.c
> +++ b/sound/soc/amd/acp-da7219-max98357a.c
> @@ -47,13 +47,15 @@
> #define DUAL_CHANNEL 2
> #define RT5682_PLL_FREQ (48000 * 512)
>
> +extern bool bt_uart_enable;
> +void *acp_soc_is_rltk_max(struct device *dev);
> +
> +#ifdef CONFIG_ACPI
> static struct snd_soc_jack cz_jack;
> static struct clk *da7219_dai_wclk;
> static struct clk *da7219_dai_bclk;
> static struct clk *rt5682_dai_wclk;
> static struct clk *rt5682_dai_bclk;
> -extern bool bt_uart_enable;
> -void *acp_soc_is_rltk_max(struct device *dev);
>
> static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
> {
> @@ -692,6 +694,7 @@ static struct snd_soc_card cz_rt5682_card = {
> .controls = cz_mc_controls,
> .num_controls = ARRAY_SIZE(cz_mc_controls),
> };
> +#endif
>
> void *acp_soc_is_rltk_max(struct device *dev)
> {
>
prev parent reply other threads:[~2021-03-29 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 14:50 [PATCH -next] ASoC: amd: acp-da7219-max98357a: Fix -Wunused-variable warning YueHaibing
2021-03-29 17:37 ` Mukunda,Vijendar [this message]
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=56a58143-863b-b5e4-4498-1190bda3e6bb@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=basavaraj.hiregoudar@amd.com \
--cc=broonie@kernel.org \
--cc=derek.fang@realtek.com \
--cc=flove@realtek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shumingf@realtek.com \
--cc=tiwai@suse.com \
--cc=yuehaibing@huawei.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).