From: kbuild test robot <lkp@intel.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: kbuild-all@lists.01.org, linux-hwmon@vger.kernel.org
Subject: [hwmon:hwmon-playground 37/44] drivers/hwmon/pmbus/max20730.c:168:21: error: initialization of 'int (*)(struct i2c_client *, int, int, int)' from incompatible pointer type 'int (*)(struct i2c_client *, int, int)'
Date: Mon, 27 Jan 2020 02:49:47 +0800 [thread overview]
Message-ID: <202001270245.yk9gEaY9%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 9941 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-playground
head: e8dc30cf9ae936e93319687fa88ed45c55797807
commit: 81a9e2ca8e40ffd25ae444bdd943dba8d3454ffe [37/44] hwmon: (pmbus) Add 'phase' parameter where needed for multi-phase support
config: nds32-randconfig-a001-20200126 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 81a9e2ca8e40ffd25ae444bdd943dba8d3454ffe
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/hwmon/pmbus/max20730.c:168:21: error: initialization of 'int (*)(struct i2c_client *, int, int, int)' from incompatible pointer type 'int (*)(struct i2c_client *, int, int)' [-Werror=incompatible-pointer-types]
168 | .read_word_data = max20730_read_word_data,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/pmbus/max20730.c:168:21: note: (near initialization for 'max20730_info[0].read_word_data')
drivers/hwmon/pmbus/max20730.c:206:21: error: initialization of 'int (*)(struct i2c_client *, int, int, int)' from incompatible pointer type 'int (*)(struct i2c_client *, int, int)' [-Werror=incompatible-pointer-types]
206 | .read_word_data = max20730_read_word_data,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/pmbus/max20730.c:206:21: note: (near initialization for 'max20730_info[1].read_word_data')
drivers/hwmon/pmbus/max20730.c:234:21: error: initialization of 'int (*)(struct i2c_client *, int, int, int)' from incompatible pointer type 'int (*)(struct i2c_client *, int, int)' [-Werror=incompatible-pointer-types]
234 | .read_word_data = max20730_read_word_data,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/pmbus/max20730.c:234:21: note: (near initialization for 'max20730_info[2].read_word_data')
cc1: some warnings being treated as errors
vim +168 drivers/hwmon/pmbus/max20730.c
cce209581a61d0 Guenter Roeck 2019-12-05 164
cce209581a61d0 Guenter Roeck 2019-12-05 165 static const struct pmbus_driver_info max20730_info[] = {
cce209581a61d0 Guenter Roeck 2019-12-05 166 [max20730] = {
cce209581a61d0 Guenter Roeck 2019-12-05 167 .pages = 1,
cce209581a61d0 Guenter Roeck 2019-12-05 @168 .read_word_data = max20730_read_word_data,
cce209581a61d0 Guenter Roeck 2019-12-05 169 .write_word_data = max20730_write_word_data,
cce209581a61d0 Guenter Roeck 2019-12-05 170
cce209581a61d0 Guenter Roeck 2019-12-05 171 /* Source : Maxim AN6042 */
cce209581a61d0 Guenter Roeck 2019-12-05 172 .format[PSC_TEMPERATURE] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 173 .m[PSC_TEMPERATURE] = 21,
cce209581a61d0 Guenter Roeck 2019-12-05 174 .b[PSC_TEMPERATURE] = 5887,
cce209581a61d0 Guenter Roeck 2019-12-05 175 .R[PSC_TEMPERATURE] = -1,
cce209581a61d0 Guenter Roeck 2019-12-05 176
cce209581a61d0 Guenter Roeck 2019-12-05 177 .format[PSC_VOLTAGE_IN] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 178 .m[PSC_VOLTAGE_IN] = 3609,
cce209581a61d0 Guenter Roeck 2019-12-05 179 .b[PSC_VOLTAGE_IN] = 0,
cce209581a61d0 Guenter Roeck 2019-12-05 180 .R[PSC_VOLTAGE_IN] = -2,
cce209581a61d0 Guenter Roeck 2019-12-05 181
cce209581a61d0 Guenter Roeck 2019-12-05 182 /*
cce209581a61d0 Guenter Roeck 2019-12-05 183 * Values in the datasheet are adjusted for temperature and
cce209581a61d0 Guenter Roeck 2019-12-05 184 * for the relationship between Vin and Vout.
cce209581a61d0 Guenter Roeck 2019-12-05 185 * Unfortunately, the data sheet suggests that Vout measurement
cce209581a61d0 Guenter Roeck 2019-12-05 186 * may be scaled with a resistor array. This is indeed the case
cce209581a61d0 Guenter Roeck 2019-12-05 187 * at least on the evaulation boards. As a result, any in-driver
cce209581a61d0 Guenter Roeck 2019-12-05 188 * adjustments would either be wrong or require elaborate means
cce209581a61d0 Guenter Roeck 2019-12-05 189 * to configure the scaling. Instead of doing that, just report
cce209581a61d0 Guenter Roeck 2019-12-05 190 * raw values and let userspace handle adjustments.
cce209581a61d0 Guenter Roeck 2019-12-05 191 */
cce209581a61d0 Guenter Roeck 2019-12-05 192 .format[PSC_CURRENT_OUT] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 193 .m[PSC_CURRENT_OUT] = 153,
cce209581a61d0 Guenter Roeck 2019-12-05 194 .b[PSC_CURRENT_OUT] = 4976,
cce209581a61d0 Guenter Roeck 2019-12-05 195 .R[PSC_CURRENT_OUT] = -1,
cce209581a61d0 Guenter Roeck 2019-12-05 196
cce209581a61d0 Guenter Roeck 2019-12-05 197 .format[PSC_VOLTAGE_OUT] = linear,
cce209581a61d0 Guenter Roeck 2019-12-05 198
cce209581a61d0 Guenter Roeck 2019-12-05 199 .func[0] = PMBUS_HAVE_VIN |
cce209581a61d0 Guenter Roeck 2019-12-05 200 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
cce209581a61d0 Guenter Roeck 2019-12-05 201 PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
cce209581a61d0 Guenter Roeck 2019-12-05 202 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
cce209581a61d0 Guenter Roeck 2019-12-05 203 },
cce209581a61d0 Guenter Roeck 2019-12-05 204 [max20734] = {
cce209581a61d0 Guenter Roeck 2019-12-05 205 .pages = 1,
cce209581a61d0 Guenter Roeck 2019-12-05 206 .read_word_data = max20730_read_word_data,
cce209581a61d0 Guenter Roeck 2019-12-05 207 .write_word_data = max20730_write_word_data,
cce209581a61d0 Guenter Roeck 2019-12-05 208
cce209581a61d0 Guenter Roeck 2019-12-05 209 /* Source : Maxim AN6209 */
cce209581a61d0 Guenter Roeck 2019-12-05 210 .format[PSC_TEMPERATURE] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 211 .m[PSC_TEMPERATURE] = 21,
cce209581a61d0 Guenter Roeck 2019-12-05 212 .b[PSC_TEMPERATURE] = 5887,
cce209581a61d0 Guenter Roeck 2019-12-05 213 .R[PSC_TEMPERATURE] = -1,
cce209581a61d0 Guenter Roeck 2019-12-05 214
cce209581a61d0 Guenter Roeck 2019-12-05 215 .format[PSC_VOLTAGE_IN] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 216 .m[PSC_VOLTAGE_IN] = 3592,
cce209581a61d0 Guenter Roeck 2019-12-05 217 .b[PSC_VOLTAGE_IN] = 0,
cce209581a61d0 Guenter Roeck 2019-12-05 218 .R[PSC_VOLTAGE_IN] = -2,
cce209581a61d0 Guenter Roeck 2019-12-05 219
cce209581a61d0 Guenter Roeck 2019-12-05 220 .format[PSC_CURRENT_OUT] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 221 .m[PSC_CURRENT_OUT] = 111,
cce209581a61d0 Guenter Roeck 2019-12-05 222 .b[PSC_CURRENT_OUT] = 3461,
cce209581a61d0 Guenter Roeck 2019-12-05 223 .R[PSC_CURRENT_OUT] = -1,
cce209581a61d0 Guenter Roeck 2019-12-05 224
cce209581a61d0 Guenter Roeck 2019-12-05 225 .format[PSC_VOLTAGE_OUT] = linear,
cce209581a61d0 Guenter Roeck 2019-12-05 226
cce209581a61d0 Guenter Roeck 2019-12-05 227 .func[0] = PMBUS_HAVE_VIN |
cce209581a61d0 Guenter Roeck 2019-12-05 228 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
cce209581a61d0 Guenter Roeck 2019-12-05 229 PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
cce209581a61d0 Guenter Roeck 2019-12-05 230 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
cce209581a61d0 Guenter Roeck 2019-12-05 231 },
cce209581a61d0 Guenter Roeck 2019-12-05 232 [max20743] = {
cce209581a61d0 Guenter Roeck 2019-12-05 233 .pages = 1,
cce209581a61d0 Guenter Roeck 2019-12-05 234 .read_word_data = max20730_read_word_data,
cce209581a61d0 Guenter Roeck 2019-12-05 235 .write_word_data = max20730_write_word_data,
cce209581a61d0 Guenter Roeck 2019-12-05 236
cce209581a61d0 Guenter Roeck 2019-12-05 237 /* Source : Maxim AN6042 */
cce209581a61d0 Guenter Roeck 2019-12-05 238 .format[PSC_TEMPERATURE] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 239 .m[PSC_TEMPERATURE] = 21,
cce209581a61d0 Guenter Roeck 2019-12-05 240 .b[PSC_TEMPERATURE] = 5887,
cce209581a61d0 Guenter Roeck 2019-12-05 241 .R[PSC_TEMPERATURE] = -1,
cce209581a61d0 Guenter Roeck 2019-12-05 242
cce209581a61d0 Guenter Roeck 2019-12-05 243 .format[PSC_VOLTAGE_IN] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 244 .m[PSC_VOLTAGE_IN] = 3597,
cce209581a61d0 Guenter Roeck 2019-12-05 245 .b[PSC_VOLTAGE_IN] = 0,
cce209581a61d0 Guenter Roeck 2019-12-05 246 .R[PSC_VOLTAGE_IN] = -2,
cce209581a61d0 Guenter Roeck 2019-12-05 247
cce209581a61d0 Guenter Roeck 2019-12-05 248 .format[PSC_CURRENT_OUT] = direct,
cce209581a61d0 Guenter Roeck 2019-12-05 249 .m[PSC_CURRENT_OUT] = 95,
cce209581a61d0 Guenter Roeck 2019-12-05 250 .b[PSC_CURRENT_OUT] = 5014,
cce209581a61d0 Guenter Roeck 2019-12-05 251 .R[PSC_CURRENT_OUT] = -1,
cce209581a61d0 Guenter Roeck 2019-12-05 252
cce209581a61d0 Guenter Roeck 2019-12-05 253 .format[PSC_VOLTAGE_OUT] = linear,
cce209581a61d0 Guenter Roeck 2019-12-05 254
cce209581a61d0 Guenter Roeck 2019-12-05 255 .func[0] = PMBUS_HAVE_VIN |
cce209581a61d0 Guenter Roeck 2019-12-05 256 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
cce209581a61d0 Guenter Roeck 2019-12-05 257 PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
cce209581a61d0 Guenter Roeck 2019-12-05 258 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
cce209581a61d0 Guenter Roeck 2019-12-05 259 },
cce209581a61d0 Guenter Roeck 2019-12-05 260 };
cce209581a61d0 Guenter Roeck 2019-12-05 261
:::::: The code at line 168 was first introduced by commit
:::::: cce209581a61d01f2b7309bed68d22fd8af34ee4 hwmon: (pmbus) Driver for MAX20730, MAX20734, and MAX20743
:::::: TO: Guenter Roeck <linux@roeck-us.net>
:::::: CC: Guenter Roeck <linux@roeck-us.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23288 bytes --]
reply other threads:[~2020-01-26 18:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202001270245.yk9gEaY9%lkp@intel.com \
--to=lkp@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).