From: kernel test robot <lkp@intel.com>
To: Rob Herring <robh@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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'?
Date: Sat, 2 Sep 2023 11:20:56 +0800 [thread overview]
Message-ID: <202309021149.AMAD3uEb-lkp@intel.com> (raw)
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
reply other threads:[~2023-09-02 3:21 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=202309021149.AMAD3uEb-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
/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.