[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2iPwOaRgrW6gw+8ZvxwKDROWFtoCz2LLF9RFDuDrEcJQ@mail.gmail.com>
Date: Fri, 6 May 2022 09:08:09 +0200
From: Arnd Bergmann <arnd@...db.de>
To: YueHaibing <yuehaibing@...wei.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Tzung-Bi Shih <tzungbi@...gle.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Trevor Wu <trevor.wu@...iatek.com>,
ALSA Development Mailing List <alsa-devel@...a-project.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC..."
<linux-mediatek@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] ASoC: mediatek: mt8195: Fix build warning without CONFIG_OF
On Fri, May 6, 2022 at 4:26 AM YueHaibing <yuehaibing@...wei.com> wrote:
>
> sound/soc/mediatek/mt8195/mt8195-mt6359.c:1639:32: warning: ‘mt8195_mt6359_max98390_rt5682_card’ defined but not used [-Wunused-variable]
> 1639 | static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sound/soc/mediatek/mt8195/mt8195-mt6359.c:1634:32: warning: ‘mt8195_mt6359_rt1011_rt5682_card’ defined but not used [-Wunused-variable]
> 1634 | static struct mt8195_card_data mt8195_mt6359_rt1011_rt5682_card = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sound/soc/mediatek/mt8195/mt8195-mt6359.c:1629:32: warning: ‘mt8195_mt6359_rt1019_rt5682_card’ defined but not used [-Wunused-variable]
> 1629 | static struct mt8195_card_data mt8195_mt6359_rt1019_rt5682_card = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> These variables is only used with CONFIG_OF, move it into the ifdef block.
>
> Fixes: 86a6b9c9dfff ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
It's generally better to remove the #ifdef rather than expanding it,
there is no need to
save a few bytes on kernel builds of this driver that disable
CONFIG_OF. Just drop
the of_match_ptr() macro as well.
Arnd
Powered by blists - more mailing lists