Hi Fengping,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on pavel-linux-leds/for-next v5.8-rc1 next-20200615]
[cannot apply to input/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Fengping-Yu/dt-bindings-Add-vibr...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
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
# 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(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
> drivers/input/misc/regulator-vibrator.c:71:4: warning: format
specifies type 'int' but the argument has type 'long' [-Wformat]
PTR_ERR(vibr_conf->reg));
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
> drivers/input/misc/regulator-vibrator.c:97:9: warning: variable
'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
drivers/input/misc/regulator-vibrator.c:50:9: note: initialize the variable 'ret'
to silence this warning
int ret;
^
= 0
2 warnings generated.
vim +71 drivers/input/misc/regulator-vibrator.c
46
47 static int mt_vibra_parse_dt(struct device *dev,
48 struct reg_vibr_config *vibr_conf)
49 {
50 int ret;
51
52 if (device_property_read_u32(dev, "min-limit",
53 &vibr_conf->min_limit))
54 vibr_conf->min_limit = DEFAULT_MIN_LIMIT;
55 vibr_conf->min_limit = max_t(unsigned int,
56 vibr_conf->min_limit, DEFAULT_MIN_LIMIT);
57
58 if (device_property_read_u32(dev, "max-limit",
59 &vibr_conf->max_limit))
60 vibr_conf->max_limit = 0;
61
62 if (!vibr_conf->max_limit &&
63 vibr_conf->max_limit < vibr_conf->min_limit) {
64 dev_err(dev, "error load dts: get error limitation(min > max)\n");
65 return -EINVAL;
66 }
67
68 vibr_conf->reg = devm_regulator_get(dev, "vib");
69 if (IS_ERR(vibr_conf->reg)) {
70 dev_err(dev, "error load dts: get regulator return %d\n",
71 PTR_ERR(vibr_conf->reg));
72 vibr_conf->reg =
NULL;
73 return PTR_ERR(vibr_conf->reg);
74 }
75
76 if (device_property_read_u32(dev, "max-volt",
77 &vibr_conf->max_volt)) {
78 dev_err(dev, "error load dts: get max-volt failed\n");
79 return -EINVAL;
80 }
81
82 if (device_property_read_u32(dev, "min-volt",
83 &vibr_conf->min_volt)) {
84 dev_err(dev, "error load dts: get min-volt failed!\n");
85 return -EINVAL;
86 }
87
88 if (vibr_conf->min_volt > vibr_conf->max_volt) {
89 dev_err(dev, "error load dts: get error voltage(min > max)\n");
90 return -EINVAL;
91 }
92
93 dev_info(dev, "vibr_conf = %u, %u, %u-%u\n",
94 vibr_conf->min_limit, vibr_conf->max_limit,
95 vibr_conf->min_volt, vibr_conf->max_volt);
96
97 return ret;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org