From: kbuild test robot <lkp@intel.com>
To: ShuFan Lee <shufan_lee@richtek.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: drivers/staging/typec/tcpci_rt1711h.c:218: undefined reference to `i2c_smbus_read_word_data'
Date: Wed, 20 Jun 2018 06:32:38 +0800 [thread overview]
Message-ID: <201806200636.sxt3fuL9%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4798 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ba4dbdedd3edc2798659bcd8b1a184ea8bdd04dc
commit: ce08eaeb6388e78daf35a5ce2e72a19026def8a7 staging: typec: rt1711h typec chip driver
date: 8 weeks ago
config: x86_64-randconfig-s4-06200335 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout ce08eaeb6388e78daf35a5ce2e72a19026def8a7
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/staging/typec/tcpci.o: In function `tcpci_probe':
>> drivers/staging/typec/tcpci.c:536: undefined reference to `__devm_regmap_init_i2c'
drivers/staging/typec/tcpci.o: In function `tcpci_i2c_driver_init':
>> drivers/staging/typec/tcpci.c:593: undefined reference to `i2c_register_driver'
drivers/staging/typec/tcpci.o: In function `tcpci_i2c_driver_exit':
>> drivers/staging/typec/tcpci.c:593: undefined reference to `i2c_del_driver'
drivers/staging/typec/tcpci_rt1711h.o: In function `rt1711h_check_revision':
>> drivers/staging/typec/tcpci_rt1711h.c:218: undefined reference to `i2c_smbus_read_word_data'
drivers/staging/typec/tcpci_rt1711h.c:225: undefined reference to `i2c_smbus_read_word_data'
drivers/staging/typec/tcpci_rt1711h.o: In function `rt1711h_probe':
>> drivers/staging/typec/tcpci_rt1711h.c:251: undefined reference to `__devm_regmap_init_i2c'
drivers/staging/typec/tcpci_rt1711h.o: In function `rt1711h_i2c_driver_init':
>> drivers/staging/typec/tcpci_rt1711h.c:308: undefined reference to `i2c_register_driver'
drivers/staging/typec/tcpci_rt1711h.o: In function `rt1711h_i2c_driver_exit':
>> drivers/staging/typec/tcpci_rt1711h.c:308: undefined reference to `i2c_del_driver'
vim +218 drivers/staging/typec/tcpci_rt1711h.c
213
214 static int rt1711h_check_revision(struct i2c_client *i2c)
215 {
216 int ret;
217
> 218 ret = i2c_smbus_read_word_data(i2c, TCPC_VENDOR_ID);
219 if (ret < 0)
220 return ret;
221 if (ret != RT1711H_VID) {
222 dev_err(&i2c->dev, "vid is not correct, 0x%04x\n", ret);
223 return -ENODEV;
224 }
225 ret = i2c_smbus_read_word_data(i2c, TCPC_PRODUCT_ID);
226 if (ret < 0)
227 return ret;
228 if (ret != RT1711H_PID) {
229 dev_err(&i2c->dev, "pid is not correct, 0x%04x\n", ret);
230 return -ENODEV;
231 }
232 return 0;
233 }
234
235 static int rt1711h_probe(struct i2c_client *client,
236 const struct i2c_device_id *i2c_id)
237 {
238 int ret;
239 struct rt1711h_chip *chip;
240
241 ret = rt1711h_check_revision(client);
242 if (ret < 0) {
243 dev_err(&client->dev, "check vid/pid fail\n");
244 return ret;
245 }
246
247 chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
248 if (!chip)
249 return -ENOMEM;
250
> 251 chip->data.regmap = devm_regmap_init_i2c(client,
252 &rt1711h_regmap_config);
253 if (IS_ERR(chip->data.regmap))
254 return PTR_ERR(chip->data.regmap);
255
256 chip->dev = &client->dev;
257 i2c_set_clientdata(client, chip);
258
259 ret = rt1711h_sw_reset(chip);
260 if (ret < 0)
261 return ret;
262
263 ret = rt1711h_init_alert(chip, client);
264 if (ret < 0)
265 return ret;
266
267 chip->data.init = rt1711h_init;
268 chip->data.set_vconn = rt1711h_set_vconn;
269 chip->data.start_drp_toggling = rt1711h_start_drp_toggling;
270 chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
271 if (IS_ERR_OR_NULL(chip->tcpci))
272 return PTR_ERR(chip->tcpci);
273
274 return 0;
275 }
276
277 static int rt1711h_remove(struct i2c_client *client)
278 {
279 struct rt1711h_chip *chip = i2c_get_clientdata(client);
280
281 tcpci_unregister_port(chip->tcpci);
282 return 0;
283 }
284
285 static const struct i2c_device_id rt1711h_id[] = {
286 { "rt1711h", 0 },
287 { }
288 };
289 MODULE_DEVICE_TABLE(i2c, rt1711h_id);
290
291 #ifdef CONFIG_OF
292 static const struct of_device_id rt1711h_of_match[] = {
293 { .compatible = "richtek,rt1711h", },
294 {},
295 };
296 MODULE_DEVICE_TABLE(of, rt1711h_of_match);
297 #endif
298
299 static struct i2c_driver rt1711h_i2c_driver = {
300 .driver = {
301 .name = "rt1711h",
302 .of_match_table = of_match_ptr(rt1711h_of_match),
303 },
304 .probe = rt1711h_probe,
305 .remove = rt1711h_remove,
306 .id_table = rt1711h_id,
307 };
> 308 module_i2c_driver(rt1711h_i2c_driver);
309
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29643 bytes --]
reply other threads:[~2018-06-19 22:33 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=201806200636.sxt3fuL9%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=shufan_lee@richtek.com \
/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
all inboxes | Powered by JetHome®