lkml.org 
[lkml]   [2022]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 -next] ASoC: mediatek: mt8195: Fix build warning without CONFIG_OF
On Sat, May 7, 2022 at 4:14 AM YueHaibing <yuehaibing@huawei.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 = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Since all users of this driver do need CONFIG_OF anyway, there is no
> need to save a few bytes on kernel builds while CONFIG_OF disabled, so
> just remove the #ifdef to fix this warning.
>
> Fixes: 86a6b9c9dfff ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: remove #ifdef block as Arnd suggested

Looks good to me,

Acked-by: Arnd Bergmann <arnd@arndb.de>

\
 
 \ /
  Last update: 2022-05-07 10:43    [W:0.076 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site