Re: [PATCH 3/3] iio: potentiometer: mcp4531: Add device tree binding

From: kbuild test robot
Date: Tue Jun 21 2016 - 03:49:04 EST


Hi,

[auto build test WARNING on iio/togreg]
[also build test WARNING on v4.7-rc4 next-20160620]
[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/Florian-Vaussard/iio-potentiometer-mcp4531-New-parts-and-device-tree/20160621-150032
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-randconfig-i0-201625 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/iio/potentiometer/mcp4531.c: In function 'mcp4531_probe':
>> drivers/iio/potentiometer/mcp4531.c:280:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
devid = (int)of_device_get_match_data(dev);
^

vim +280 drivers/iio/potentiometer/mcp4531.c

264 const struct i2c_device_id *id)
265 {
266 struct device *dev = &client->dev;
267 unsigned long devid;
268 struct mcp4531_data *data;
269 struct iio_dev *indio_dev;
270 const struct of_device_id *match;
271
272 if (!i2c_check_functionality(client->adapter,
273 I2C_FUNC_SMBUS_WORD_DATA)) {
274 dev_err(dev, "SMBUS Word Data not supported\n");
275 return -EOPNOTSUPP;
276 }
277
278 match = of_match_device(of_match_ptr(mcp45xx_of_match), dev);
279 if (match)
> 280 devid = (int)of_device_get_match_data(dev);
281 else
282 devid = id->driver_data;
283
284 indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
285 if (!indio_dev)
286 return -ENOMEM;
287 data = iio_priv(indio_dev);
288 i2c_set_clientdata(client, indio_dev);

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

Attachment: .config.gz
Description: Binary data