All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Charles <hsu.yungteng@gmail.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-hwmon@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>
Subject: [hwmon:hwmon-next 23/24] drivers/hwmon/pmbus/pm6764tr.c:22:68: error: too few arguments to function call, expected 4, have 3
Date: Thu, 3 Dec 2020 22:24:21 +0800	[thread overview]
Message-ID: <202012032215.Hf34rcAX-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4849 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head:   9b08a57ac1303d569e54af0fc0644bc590dd1c87
commit: c90ff7d58cd8f25fa851048ef8a5b521c172a192 [23/24] hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator
config: mips-randconfig-r014-20201203 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32c501dd88b62787d3a5ffda7aabcf4650dbe3cd)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?id=c90ff7d58cd8f25fa851048ef8a5b521c172a192
        git remote add hwmon https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
        git fetch --no-tags hwmon hwmon-next
        git checkout c90ff7d58cd8f25fa851048ef8a5b521c172a192
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

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

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37243 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hwmon:hwmon-next 23/24] drivers/hwmon/pmbus/pm6764tr.c:22:68: error: too few arguments to function call, expected 4, have 3
Date: Thu, 03 Dec 2020 22:24:21 +0800	[thread overview]
Message-ID: <202012032215.Hf34rcAX-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4956 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head:   9b08a57ac1303d569e54af0fc0644bc590dd1c87
commit: c90ff7d58cd8f25fa851048ef8a5b521c172a192 [23/24] hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator
config: mips-randconfig-r014-20201203 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32c501dd88b62787d3a5ffda7aabcf4650dbe3cd)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?id=c90ff7d58cd8f25fa851048ef8a5b521c172a192
        git remote add hwmon https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
        git fetch --no-tags hwmon hwmon-next
        git checkout c90ff7d58cd8f25fa851048ef8a5b521c172a192
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

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

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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37243 bytes --]

             reply	other threads:[~2020-12-03 15:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 14:24 kernel test robot [this message]
2020-12-03 14:24 ` [hwmon:hwmon-next 23/24] drivers/hwmon/pmbus/pm6764tr.c:22:68: error: too few arguments to function call, expected 4, have 3 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202012032215.Hf34rcAX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hsu.yungteng@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.