Hi Alexandre, I love your patch! Yet something to improve: [auto build test ERROR on abelloni/rtc-next] [also build test ERROR on v4.17 next-20180601] [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/Alexandre-Belloni/rtc-mrst-switch-to-devm_rtc_allocate_device/20180605-014319 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next config: x86_64-randconfig-x007-201822 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers//rtc/rtc-mrst.c: In function 'vrtc_mrst_do_probe': >> drivers//rtc/rtc-mrst.c:381:20: error: 'mrst' undeclared (first use in this function); did you mean 'msr'? free_irq(rtc_irq, mrst->rtc); ^~~~ msr drivers//rtc/rtc-mrst.c:381:20: note: each undeclared identifier is reported only once for each function it appears in vim +381 drivers//rtc/rtc-mrst.c 318 319 static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, 320 int rtc_irq) 321 { 322 int retval = 0; 323 unsigned char rtc_control; 324 325 /* There can be only one ... */ 326 if (mrst_rtc.dev) 327 return -EBUSY; 328 329 if (!iomem) 330 return -ENODEV; 331 332 iomem = request_mem_region(iomem->start, resource_size(iomem), 333 driver_name); 334 if (!iomem) { 335 dev_dbg(dev, "i/o mem already in use.\n"); 336 return -EBUSY; 337 } 338 339 mrst_rtc.irq = rtc_irq; 340 mrst_rtc.iomem = iomem; 341 mrst_rtc.dev = dev; 342 dev_set_drvdata(dev, &mrst_rtc); 343 344 mrst_rtc.rtc = devm_rtc_allocate_device(dev); 345 if (IS_ERR(mrst_rtc.rtc)) 346 return PTR_ERR(mrst_rtc.rtc); 347 348 mrst_rtc.rtc->ops = &mrst_rtc_ops; 349 350 rename_region(iomem, dev_name(&mrst_rtc.rtc->dev)); 351 352 spin_lock_irq(&rtc_lock); 353 mrst_irq_disable(&mrst_rtc, RTC_PIE | RTC_AIE); 354 rtc_control = vrtc_cmos_read(RTC_CONTROL); 355 spin_unlock_irq(&rtc_lock); 356 357 if (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY))) 358 dev_dbg(dev, "TODO: support more than 24-hr BCD mode\n"); 359 360 if (rtc_irq) { 361 retval = request_irq(rtc_irq, mrst_rtc_irq, 362 0, dev_name(&mrst_rtc.rtc->dev), 363 mrst_rtc.rtc); 364 if (retval < 0) { 365 dev_dbg(dev, "IRQ %d is already in use, err %d\n", 366 rtc_irq, retval); 367 goto cleanup0; 368 } 369 } 370 371 retval = rtc_register_device(mrst_rtc.rtc); 372 if (retval) { 373 retval = PTR_ERR(mrst_rtc.rtc); 374 goto cleanup1; 375 } 376 377 dev_dbg(dev, "initialised\n"); 378 return 0; 379 380 cleanup1: > 381 free_irq(rtc_irq, mrst->rtc); 382 cleanup0: 383 mrst_rtc.dev = NULL; 384 release_mem_region(iomem->start, resource_size(iomem)); 385 dev_err(dev, "rtc-mrst: unable to initialise\n"); 386 return retval; 387 } 388 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip