[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220728133827.5f59e824@endymion.delvare>
Date: Thu, 28 Jul 2022 13:38:27 +0200
From: Jean Delvare <jdelvare@...e.de>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
Cc: linux-mediatek@...ts.infradead.org,
Matthias Brugger <matthias.bgg@...il.com>,
Sean Wang <sean.wang@...iatek.com>,
LKML <linux-kernel@...r.kernel.org>,
Chenglin Xu <chenglin.xu@...iatek.com>
Subject: Re: [PATCH] soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF
Hi Angelo,
On Thu, 28 Jul 2022 12:51:44 +0200, AngeloGioacchino Del Regno wrote:
> Il 28/07/22 11:22, Jean Delvare ha scritto:
> > With the following configuration options:
> > CONFIG_OF is not set
> > CONFIG_MTK_PMIC_WRAP=y
> > CONFIG_MTK_SCPSYS=y
> > we get the following build warnings:
> >
> > CC drivers/soc/mediatek/mtk-pmic-wrap.o
> > drivers/soc/mediatek/mtk-pmic-wrap.c:2138:34: warning: ‘of_pwrap_match_tbl’ defined but not used [-Wunused-const-variable=]
> > drivers/soc/mediatek/mtk-pmic-wrap.c:1953:34: warning: ‘of_slave_match_tbl’ defined but not used [-Wunused-const-variable=]
> > CC drivers/soc/mediatek/mtk-scpsys.o
> > drivers/soc/mediatek/mtk-scpsys.c:1084:34: warning: ‘of_scpsys_match_tbl’ defined but not used [-Wunused-const-variable=]
> >
> > Looking at the code, both drivers can only bind to OF-defined device
> > nodes, so these drivers are useless without OF and should therefore
> > depend on it.
>
> I would prefer that you solve this warning by removing of_match_ptr() from both
> drivers instead.
Actually we could do both. Once the drivers depend on OF,
of_match_ptr(_ptr) will always resolve to (_ptr) so we can indeed
save the preprocessor some work.
--
Jean Delvare
SUSE L3 Support
Powered by blists - more mailing lists