Re: [PATCH] i2c: use void pointers for supplying data for reads and writes

From: kbuild test robot
Date: Sun Apr 02 2017 - 20:59:52 EST


Hi Dmitry,

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on v4.11-rc4 next-20170331]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/i2c-use-void-pointers-for-supplying-data-for-reads-and-writes/20170403-074306
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: i386-randconfig-i0-201714 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

drivers/iio/adc/max1363.c: In function 'max1363_probe':
>> drivers/iio/adc/max1363.c:1633:12: warning: assignment from incompatible pointer type [enabled by default]
st->send = i2c_master_send;
^
drivers/iio/adc/max1363.c:1634:12: warning: assignment from incompatible pointer type [enabled by default]
st->recv = i2c_master_recv;
^

vim +1633 drivers/iio/adc/max1363.c

a405b00e Guenter Roeck 2013-02-03 1617 if (!IS_ERR(vref)) {
a405b00e Guenter Roeck 2013-02-03 1618 int vref_uv;
a405b00e Guenter Roeck 2013-02-03 1619
a405b00e Guenter Roeck 2013-02-03 1620 ret = regulator_enable(vref);
a405b00e Guenter Roeck 2013-02-03 1621 if (ret)
a405b00e Guenter Roeck 2013-02-03 1622 goto error_disable_reg;
a405b00e Guenter Roeck 2013-02-03 1623 st->vref = vref;
a405b00e Guenter Roeck 2013-02-03 1624 vref_uv = regulator_get_voltage(vref);
a405b00e Guenter Roeck 2013-02-03 1625 if (vref_uv <= 0) {
a405b00e Guenter Roeck 2013-02-03 1626 ret = -EINVAL;
a405b00e Guenter Roeck 2013-02-03 1627 goto error_disable_reg;
a405b00e Guenter Roeck 2013-02-03 1628 }
a405b00e Guenter Roeck 2013-02-03 1629 st->vref_uv = vref_uv;
a405b00e Guenter Roeck 2013-02-03 1630 }
a405b00e Guenter Roeck 2013-02-03 1631
61bdda69 Vivien Didelot 2013-10-20 1632 if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
61bdda69 Vivien Didelot 2013-10-20 @1633 st->send = i2c_master_send;
61bdda69 Vivien Didelot 2013-10-20 1634 st->recv = i2c_master_recv;
61bdda69 Vivien Didelot 2013-10-20 1635 } else if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE)
61bdda69 Vivien Didelot 2013-10-20 1636 && st->chip_info->bits == 8) {
61bdda69 Vivien Didelot 2013-10-20 1637 st->send = max1363_smbus_send;
61bdda69 Vivien Didelot 2013-10-20 1638 st->recv = max1363_smbus_recv;
61bdda69 Vivien Didelot 2013-10-20 1639 } else {
61bdda69 Vivien Didelot 2013-10-20 1640 ret = -EOPNOTSUPP;
61bdda69 Vivien Didelot 2013-10-20 1641 goto error_disable_reg;

:::::: The code at line 1633 was first introduced by commit
:::::: 61bdda69222c09efd8943d240cd2a8e0bb659d82 iio:adc:max1363 support SMBus for 8-bit devices

:::::: TO: Vivien Didelot <vivien.didelot@xxxxxxxxxxxxxxxxxxxx>
:::::: CC: Jonathan Cameron <jic23@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip