lkml.org 
[lkml]   [2022]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: drivers/regulator/mt6380-regulator.c:333:34: warning: 'mt6380_of_match' defined but not used
On Sun, 24 Jul 2022 02:37:15 +0800, kernel test robot wrote:
> All warnings (new ones prefixed by >>):
>
> >> drivers/regulator/mt6380-regulator.c:333:34: warning: 'mt6380_of_match' defined but not used [-Wunused-const-variable=]
> 333 | static const struct of_device_id mt6380_of_match[] = {
> | ^~~~~~~~~~~~~~~
> --
> >> drivers/soc/mediatek/mtk-pmic-wrap.c:1436:34: warning: 'of_pwrap_match_tbl' defined but not used [-Wunused-const-variable=]
> 1436 | static const struct of_device_id of_pwrap_match_tbl[] = {
> | ^~~~~~~~~~~~~~~~~~
> >> drivers/soc/mediatek/mtk-pmic-wrap.c:1370:34: warning: 'of_slave_match_tbl' defined but not used [-Wunused-const-variable=]
> 1370 | static const struct of_device_id of_slave_match_tbl[] = {
> | ^~~~~~~~~~~~~~~~~~

Not sure what do to with this one. These warnings can be silenced with
__maybe_unused. But does it actually make sense to build these drivers
with CONFIG_OF disabled?

As I understand it, that's the condition which makes the warnings
appear, and from a quick look at the code, it seems to me that the
drivers are useless then. It might make more sense to make both drivers
depend on OF. What do you think?

--
Jean Delvare
SUSE L3 Support

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