Hi Alexandre, I love your patch! Perhaps something to improve: [auto build test WARNING on abelloni/rtc-next] [also build test WARNING on v5.6-rc5 next-20200311] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Alexandre-Belloni/rtc-88pm860x-fix-possible-race-condition/20200312-073738 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next config: i386-randconfig-h002-20200311 (attached as .config) compiler: gcc-7 (Debian 7.5.0-5) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All warnings (new ones prefixed by >>): drivers/rtc/rtc-88pm860x.c: In function 'pm860x_rtc_probe': drivers/rtc/rtc-88pm860x.c:309:34: warning: statement with no effect [-Wunused-value] #define pm860x_rtc_dt_init(x, y) (-1) ^ >> drivers/rtc/rtc-88pm860x.c:353:2: note: in expansion of macro 'pm860x_rtc_dt_init' pm860x_rtc_dt_init(pdev, info); ^~~~~~~~~~~~~~~~~~ Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR Cyclomatic Complexity 1 include/linux/workqueue.h:__init_work Cyclomatic Complexity 3 include/linux/pm_wakeup.h:device_may_wakeup Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata Cyclomatic Complexity 1 include/linux/device.h:dev_get_platdata Cyclomatic Complexity 1 include/linux/platform_device.h:platform_get_drvdata Cyclomatic Complexity 2 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_suspend Cyclomatic Complexity 2 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_resume Cyclomatic Complexity 1 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_driver_init Cyclomatic Complexity 1 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_remove Cyclomatic Complexity 2 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_alarm_irq_enable Cyclomatic Complexity 1 include/linux/rtc.h:rtc_time_to_tm Cyclomatic Complexity 1 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_read_alarm Cyclomatic Complexity 1 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_read_time Cyclomatic Complexity 1 include/linux/rtc.h:rtc_tm_to_time Cyclomatic Complexity 2 drivers/rtc/rtc-88pm860x.c:rtc_next_alarm_time Cyclomatic Complexity 2 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_set_alarm Cyclomatic Complexity 2 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_set_time Cyclomatic Complexity 1 drivers/rtc/rtc-88pm860x.c:rtc_update_handler Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc Cyclomatic Complexity 1 include/linux/err.h:IS_ERR Cyclomatic Complexity 1 include/linux/workqueue.h:queue_delayed_work Cyclomatic Complexity 1 include/linux/workqueue.h:schedule_delayed_work Cyclomatic Complexity 9 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_probe Cyclomatic Complexity 6 drivers/rtc/rtc-88pm860x.c:calibrate_vrtc_work Cyclomatic Complexity 1 drivers/rtc/rtc-88pm860x.c:pm860x_rtc_driver_exit vim +/pm860x_rtc_dt_init +353 drivers/rtc/rtc-88pm860x.c 311 312 static int pm860x_rtc_probe(struct platform_device *pdev) 313 { 314 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); 315 struct pm860x_rtc_pdata *pdata = NULL; 316 struct pm860x_rtc_info *info; 317 int ret; 318 319 pdata = dev_get_platdata(&pdev->dev); 320 321 info = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_rtc_info), 322 GFP_KERNEL); 323 if (!info) 324 return -ENOMEM; 325 info->irq = platform_get_irq(pdev, 0); 326 if (info->irq < 0) 327 return info->irq; 328 329 info->chip = chip; 330 info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion; 331 info->dev = &pdev->dev; 332 dev_set_drvdata(&pdev->dev, info); 333 334 info->rtc_dev = devm_rtc_allocate_device(&pdev->dev); 335 if (IS_ERR(info->rtc_dev)) 336 return PTR_ERR(info->rtc_dev); 337 338 ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, 339 rtc_update_handler, IRQF_ONESHOT, "rtc", 340 info); 341 if (ret < 0) { 342 dev_err(chip->dev, "Failed to request IRQ: #%d: %d\n", 343 info->irq, ret); 344 return ret; 345 } 346 347 /* set addresses of 32-bit base value for RTC time */ 348 pm860x_page_reg_write(info->i2c, REG0_ADDR, REG0_DATA); 349 pm860x_page_reg_write(info->i2c, REG1_ADDR, REG1_DATA); 350 pm860x_page_reg_write(info->i2c, REG2_ADDR, REG2_DATA); 351 pm860x_page_reg_write(info->i2c, REG3_ADDR, REG3_DATA); 352 > 353 pm860x_rtc_dt_init(pdev, info); 354 355 info->rtc_dev->ops = &pm860x_rtc_ops; 356 357 ret = rtc_register_device(info->rtc_dev); 358 if (ret) 359 return ret; 360 361 /* 362 * enable internal XO instead of internal 3.25MHz clock since it can 363 * free running in PMIC power-down state. 364 */ 365 pm860x_set_bits(info->i2c, PM8607_RTC1, RTC1_USE_XO, RTC1_USE_XO); 366 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org