Re: [PATCH v6] hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator.

From: kernel test robot
Date: Tue Dec 15 2020 - 08:05:46 EST


Hi Charles,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.10]
[cannot apply to hwmon/hwmon-next next-20201215]
[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/Charles-Hsu/hwmon-Add-driver-for-STMicroelectronics-PM6764-Voltage-Regulator/20201211-175428
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: x86_64-randconfig-a012-20201215 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a29ecca7819a6ed4250d3689b12b1f664bb790d7)
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/b03a990fad3a963b4dd9801a24c2e4acae91d2cf
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Charles-Hsu/hwmon-Add-driver-for-STMicroelectronics-PM6764-Voltage-Regulator/20201211-175428
git checkout b03a990fad3a963b4dd9801a24c2e4acae91d2cf
# 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@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/hwmon/pmbus/pm6764tr.c:22:68: error: too few arguments to function call, expected 4, have 3
ret = pmbus_read_word_data(client, page, PM6764TR_PMBUS_READ_VOUT);
~~~~~~~~~~~~~~~~~~~~ ^
drivers/hwmon/pmbus/pmbus.h:479:5: note: 'pmbus_read_word_data' declared here
int pmbus_read_word_data(struct i2c_client *client, int page, int phase,
^
>> drivers/hwmon/pmbus/pm6764tr.c:42:20: error: incompatible function pointer types initializing 'int (*)(struct i2c_client *, int, int, int)' with an expression of type 'int (struct i2c_client *, int, int)' [-Werror,-Wincompatible-function-pointer-types]
.read_word_data = pm6764tr_read_word_data,
^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hwmon/pmbus/pm6764tr.c:48:36: error: too many arguments to function call, expected 2, have 3
return pmbus_do_probe(client, id, &pm6764tr_info);
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
drivers/hwmon/pmbus/pmbus.h:492:5: note: 'pmbus_do_probe' declared here
int pmbus_do_probe(struct i2c_client *client, struct pmbus_driver_info *info);
^
>> drivers/hwmon/pmbus/pm6764tr.c:68:15: error: incompatible function pointer types initializing 'int (*)(struct i2c_client *)' with an expression of type 'int (struct i2c_client *, const struct i2c_device_id *)' [-Werror,-Wincompatible-function-pointer-types]
.probe_new = pm6764tr_probe,
^~~~~~~~~~~~~~
4 errors generated.

vim +22 drivers/hwmon/pmbus/pm6764tr.c

15
16 static int pm6764tr_read_word_data(struct i2c_client *client, int page, int reg)
17 {
18 int ret;
19
20 switch (reg) {
21 case PMBUS_VIRT_READ_VMON:
> 22 ret = pmbus_read_word_data(client, page, PM6764TR_PMBUS_READ_VOUT);
23 break;
24 default:
25 ret = -ENODATA;
26 break;
27 }
28 return ret;
29 }
30
31 static struct pmbus_driver_info pm6764tr_info = {
32 .pages = 1,
33 .format[PSC_VOLTAGE_IN] = linear,
34 .format[PSC_VOLTAGE_OUT] = vid,
35 .format[PSC_TEMPERATURE] = linear,
36 .format[PSC_CURRENT_OUT] = linear,
37 .format[PSC_POWER] = linear,
38 .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_PIN |
39 PMBUS_HAVE_IOUT | PMBUS_HAVE_POUT | PMBUS_HAVE_VMON |
40 PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_STATUS_VOUT |
41 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
> 42 .read_word_data = pm6764tr_read_word_data,
43 };
44
45 static int pm6764tr_probe(struct i2c_client *client,
46 const struct i2c_device_id *id)
47 {
> 48 return pmbus_do_probe(client, id, &pm6764tr_info);
49 }
50
51 static const struct i2c_device_id pm6764tr_id[] = {
52 {"pm6764tr", 0},
53 {}
54 };
55 MODULE_DEVICE_TABLE(i2c, pm6764tr_id);
56
57 static const struct of_device_id pm6764tr_of_match[] = {
58 {.compatible = "st,pm6764tr"},
59 {}
60 };
61
62 /* This is the driver that will be inserted */
63 static struct i2c_driver pm6764tr_driver = {
64 .driver = {
65 .name = "pm6764tr",
66 .of_match_table = of_match_ptr(pm6764tr_of_match),
67 },
> 68 .probe_new = pm6764tr_probe,
69 .id_table = pm6764tr_id,
70 };
71

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

Attachment: .config.gz
Description: application/gzip