tree:
https://github.com/alexandrebelloni/linux rtc-misc
head: 3c0fbf8783c942e63625329399b2a32847369934
commit: f637dc2e81ffea3ef980682652dfccc1f2294e86 [34/39] rtc: cros-ec: let the core handle
rtc range
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f637dc2e81ffea3ef980682652dfccc1f2294e86
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers//rtc/rtc-cros-ec.c: In function 'cros_ec_rtc_probe':
> drivers//rtc/rtc-cros-ec.c:354:2: error: 'err' undeclared
(first use in this function)
err = rtc_register_device(cros_ec_rtc->rtc);
^~~
drivers//rtc/rtc-cros-ec.c:354:2: note: each undeclared identifier is reported only
once for each function it appears in
vim +/err +354 drivers//rtc/rtc-cros-ec.c
314
315 static SIMPLE_DEV_PM_OPS(cros_ec_rtc_pm_ops, cros_ec_rtc_suspend,
316 cros_ec_rtc_resume);
317
318 static int cros_ec_rtc_probe(struct platform_device *pdev)
319 {
320 struct cros_ec_dev *ec_dev = dev_get_drvdata(pdev->dev.parent);
321 struct cros_ec_device *cros_ec = ec_dev->ec_dev;
322 struct cros_ec_rtc *cros_ec_rtc;
323 struct rtc_time tm;
324 int ret;
325
326 cros_ec_rtc = devm_kzalloc(&pdev->dev, sizeof(*cros_ec_rtc),
327 GFP_KERNEL);
328 if (!cros_ec_rtc)
329 return -ENOMEM;
330
331 platform_set_drvdata(pdev, cros_ec_rtc);
332 cros_ec_rtc->cros_ec = cros_ec;
333
334 /* Get initial time */
335 ret = cros_ec_rtc_read_time(&pdev->dev, &tm);
336 if (ret) {
337 dev_err(&pdev->dev, "failed to read RTC time\n");
338 return ret;
339 }
340
341 ret = device_init_wakeup(&pdev->dev, 1);
342 if (ret) {
343 dev_err(&pdev->dev, "failed to initialize wakeup\n");
344 return ret;
345 }
346
347 cros_ec_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
348 if (IS_ERR(cros_ec_rtc->rtc))
349 return PTR_ERR(cros_ec_rtc->rtc);
350
351 cros_ec_rtc->rtc->ops = &cros_ec_rtc_ops;
352 cros_ec_rtc->rtc->range_max = U32_MAX;
353
354 err = rtc_register_device(cros_ec_rtc->rtc);
355 if
(err)
356 return err;
357
358 /* Get RTC events from the EC. */
359 cros_ec_rtc->notifier.notifier_call = cros_ec_rtc_event;
360 ret = blocking_notifier_chain_register(&cros_ec->event_notifier,
361 &cros_ec_rtc->notifier);
362 if (ret) {
363 dev_err(&pdev->dev, "failed to register notifier\n");
364 return ret;
365 }
366
367 return 0;
368 }
369
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation