* [robh:for-kernelci 35/68] drivers/mfd/wm831x-i2c.c:30:27: error: implicit declaration of function 'i2c_device_get_match_data'; did you mean 'of_device_get_match_data'?
@ 2023-09-02 3:20 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-02 3:20 UTC (permalink / raw)
To: Rob Herring; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-kernelci
head: 9ece0c059fa7600e46d8e2deecc2fa1bd86cde7e
commit: 3d460ef8fac8644d12f84dacdc46cdfa981880c5 [35/68] mfd: Use device_get_match_data()
config: x86_64-buildonly-randconfig-002-20230902 (https://download.01.org/0day-ci/archive/20230902/202309021149.AMAD3uEb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230902/202309021149.AMAD3uEb-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309021149.AMAD3uEb-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/mfd/wm831x-i2c.c: In function 'wm831x_i2c_probe':
>> drivers/mfd/wm831x-i2c.c:30:27: error: implicit declaration of function 'i2c_device_get_match_data'; did you mean 'of_device_get_match_data'? [-Werror=implicit-function-declaration]
30 | type = (uintptr_t)i2c_device_get_match_data(i2c);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| of_device_get_match_data
cc1: some warnings being treated as errors
vim +30 drivers/mfd/wm831x-i2c.c
22
23 static int wm831x_i2c_probe(struct i2c_client *i2c)
24 {
25 struct wm831x_pdata *pdata = dev_get_platdata(&i2c->dev);
26 struct wm831x *wm831x;
27 enum wm831x_parent type;
28 int ret;
29
> 30 type = (uintptr_t)i2c_device_get_match_data(i2c);
31 if (!type) {
32 dev_err(&i2c->dev, "Failed to match device\n");
33 return -ENODEV;
34 }
35
36 wm831x = devm_kzalloc(&i2c->dev, sizeof(struct wm831x), GFP_KERNEL);
37 if (wm831x == NULL)
38 return -ENOMEM;
39
40 i2c_set_clientdata(i2c, wm831x);
41 wm831x->dev = &i2c->dev;
42 wm831x->type = type;
43
44 wm831x->regmap = devm_regmap_init_i2c(i2c, &wm831x_regmap_config);
45 if (IS_ERR(wm831x->regmap)) {
46 ret = PTR_ERR(wm831x->regmap);
47 dev_err(wm831x->dev, "Failed to allocate register map: %d\n",
48 ret);
49 return ret;
50 }
51
52 if (pdata)
53 memcpy(&wm831x->pdata, pdata, sizeof(*pdata));
54
55 return wm831x_device_init(wm831x, i2c->irq);
56 }
57
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-02 3:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-02 3:20 [robh:for-kernelci 35/68] drivers/mfd/wm831x-i2c.c:30:27: error: implicit declaration of function 'i2c_device_get_match_data'; did you mean 'of_device_get_match_data'? kernel test robot
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.