diff mbox series

[1/3] regulator: mt6360: Add OF match table

Message ID 20210109021046.21907-1-matthias.bgg@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] regulator: mt6360: Add OF match table | expand

Commit Message

Matthias Brugger Jan. 9, 2021, 2:10 a.m. UTC
From: Matthias Brugger <mbrugger@suse.com>

Binding documentation mentions that a compatible is required for the
MT6360 device node, but the driver doesn't provide a OF match table.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---

 drivers/regulator/mt6360-regulator.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

kernel test robot Jan. 9, 2021, 10:44 a.m. UTC | #1
Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on regulator/for-next]
[also build test WARNING on v5.11-rc2 next-20210108]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/matthias-bgg-kernel-org/regulator-mt6360-Add-OF-match-table/20210109-101451
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: x86_64-randconfig-a013-20210108 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bc556e5685c0f97e79fb7b3c6f15cc5062db8e36)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/3afb01e34a78dae03d0f75af620ac4eab7f4064c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review matthias-bgg-kernel-org/regulator-mt6360-Add-OF-match-table/20210109-101451
        git checkout 3afb01e34a78dae03d0f75af620ac4eab7f4064c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/regulator/mt6360-regulator.c:448:34: warning: unused variable 'mt6360_of_match' [-Wunused-const-variable]
   static const struct of_device_id mt6360_of_match[] = {
                                    ^
   1 warning generated.


vim +/mt6360_of_match +448 drivers/regulator/mt6360-regulator.c

   447	
 > 448	static const struct of_device_id mt6360_of_match[] = {
   449		{ .compatible = "mediatek,mt6360-regulator", },
   450		{ /* sentinel */ },
   451	};
   452	MODULE_DEVICE_TABLE(of, mt6360_of_match);
   453	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/regulator/mt6360-regulator.c b/drivers/regulator/mt6360-regulator.c
index 15308ee29c13..07cbb9bb3c09 100644
--- a/drivers/regulator/mt6360-regulator.c
+++ b/drivers/regulator/mt6360-regulator.c
@@ -445,9 +445,16 @@  static const struct platform_device_id mt6360_regulator_id_table[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
 
+static const struct of_device_id mt6360_of_match[] = {
+	{ .compatible = "mediatek,mt6360-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6360_of_match);
+
 static struct platform_driver mt6360_regulator_driver = {
 	.driver = {
 		.name = "mt6360-regulator",
+		.of_match_table = of_match_ptr(mt6360_of_match),
 	},
 	.probe = mt6360_regulator_probe,
 	.id_table = mt6360_regulator_id_table,