Messages in this thread | | | Date | Mon, 25 Jul 2022 10:00:56 +0200 | From | Jean Delvare <> | Subject | Re: 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
| |