Hi Liao, kernel test robot noticed the following build warnings: [auto build test WARNING on abelloni/rtc-next] [also build test WARNING on tegra/for-next linus/master v6.11-rc4 next-20240821] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Liao-Yuanhong/rtc-rtc-at91rm9200-Use-devm_clk_get_enabled-helpers/20240821-190257 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next patch link: https://lore.kernel.org/r/20240821092846.20138-5-liaoyuanhong%40vivo.com patch subject: [PATCH 4/7] rtc:rtc-s3c:Use devm_clk_get_enabled() helpers config: arm-defconfig (https://download.01.org/0day-ci/archive/20240822/202408221253.CO0v47kj-lkp@xxxxxxxxx/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408221253.CO0v47kj-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202408221253.CO0v47kj-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/rtc/rtc-s3c.c:483:1: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ 1 warning generated. vim +483 drivers/rtc/rtc-s3c.c 1add6781c85d7e Ben Dooks 2006-07-01 397 5a167f4543e45d Greg Kroah-Hartman 2012-12-21 398 static int s3c_rtc_probe(struct platform_device *pdev) 1add6781c85d7e Ben Dooks 2006-07-01 399 { 19be09f51d3610 Chanwoo Choi 2014-10-13 400 struct s3c_rtc *info = NULL; 1add6781c85d7e Ben Dooks 2006-07-01 401 int ret; 1add6781c85d7e Ben Dooks 2006-07-01 402 19be09f51d3610 Chanwoo Choi 2014-10-13 403 info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); 19be09f51d3610 Chanwoo Choi 2014-10-13 404 if (!info) 19be09f51d3610 Chanwoo Choi 2014-10-13 405 return -ENOMEM; 1add6781c85d7e Ben Dooks 2006-07-01 406 19be09f51d3610 Chanwoo Choi 2014-10-13 407 info->dev = &pdev->dev; 64704c92fd19c5 Marek Szyprowski 2019-01-18 408 info->data = of_device_get_match_data(&pdev->dev); ae05c95074e0ea Chanwoo Choi 2014-10-13 409 if (!info->data) { ae05c95074e0ea Chanwoo Choi 2014-10-13 410 dev_err(&pdev->dev, "failed getting s3c_rtc_data\n"); ae05c95074e0ea Chanwoo Choi 2014-10-13 411 return -EINVAL; ae05c95074e0ea Chanwoo Choi 2014-10-13 412 } 5a5b614ba61cc2 Marek Szyprowski 2019-01-21 413 spin_lock_init(&info->alarm_lock); 19be09f51d3610 Chanwoo Choi 2014-10-13 414 19be09f51d3610 Chanwoo Choi 2014-10-13 415 platform_set_drvdata(pdev, info); 19be09f51d3610 Chanwoo Choi 2014-10-13 416 19be09f51d3610 Chanwoo Choi 2014-10-13 417 info->irq_alarm = platform_get_irq(pdev, 0); faac910201e9be Stephen Boyd 2019-07-30 418 if (info->irq_alarm < 0) 19be09f51d3610 Chanwoo Choi 2014-10-13 419 return info->irq_alarm; 1add6781c85d7e Ben Dooks 2006-07-01 420 ce9af89392024f Marek Szyprowski 2020-12-02 421 dev_dbg(&pdev->dev, "s3c2410_rtc: alarm irq %d\n", info->irq_alarm); 1add6781c85d7e Ben Dooks 2006-07-01 422 1add6781c85d7e Ben Dooks 2006-07-01 423 /* get the memory region */ 09ef18bcd5ac6c YueHaibing 2019-10-06 424 info->base = devm_platform_ioremap_resource(pdev, 0); 19be09f51d3610 Chanwoo Choi 2014-10-13 425 if (IS_ERR(info->base)) 19be09f51d3610 Chanwoo Choi 2014-10-13 426 return PTR_ERR(info->base); 1add6781c85d7e Ben Dooks 2006-07-01 427 ab10bbbb4bf910 Liao Yuanhong 2024-08-21 428 info->rtc_clk = devm_clk_get_enabled(&pdev->dev, "rtc"); eb633de6abcb30 Yang Yingliang 2022-09-19 429 if (IS_ERR(info->rtc_clk)) eb633de6abcb30 Yang Yingliang 2022-09-19 430 return dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_clk), eb633de6abcb30 Yang Yingliang 2022-09-19 431 "failed to find rtc clock\n"); e48add8c1c462f Atul Dahiya 2010-07-20 432 eaf3a659086e1d Marek Szyprowski 2014-10-29 433 if (info->data->needs_src_clk) { ab10bbbb4bf910 Liao Yuanhong 2024-08-21 434 info->rtc_src_clk = devm_clk_get_enabled(&pdev->dev, "rtc_src"); df9e26d093d33a Chanwoo Choi 2014-10-13 435 if (IS_ERR(info->rtc_src_clk)) { c52d270c68a02f Krzysztof Kozlowski 2020-08-30 436 ret = dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_src_clk), eaf3a659086e1d Marek Szyprowski 2014-10-29 437 "failed to find rtc source clock\n"); ab10bbbb4bf910 Liao Yuanhong 2024-08-21 438 return ret; df9e26d093d33a Chanwoo Choi 2014-10-13 439 } eaf3a659086e1d Marek Szyprowski 2014-10-29 440 } df9e26d093d33a Chanwoo Choi 2014-10-13 441 31b16d978f902b Marek Szyprowski 2020-12-02 442 /* disable RTC enable bits potentially set by the bootloader */ 31b16d978f902b Marek Szyprowski 2020-12-02 443 if (info->data->disable) 31b16d978f902b Marek Szyprowski 2020-12-02 444 info->data->disable(info); 31b16d978f902b Marek Szyprowski 2020-12-02 445 1add6781c85d7e Ben Dooks 2006-07-01 446 /* check to see if everything is setup correctly */ ae05c95074e0ea Chanwoo Choi 2014-10-13 447 if (info->data->enable) ae05c95074e0ea Chanwoo Choi 2014-10-13 448 info->data->enable(info); 1add6781c85d7e Ben Dooks 2006-07-01 449 d4a48c2ad75b06 Jingoo Han 2013-02-21 450 dev_dbg(&pdev->dev, "s3c2410_rtc: RTCCON=%02x\n", 19be09f51d3610 Chanwoo Choi 2014-10-13 451 readw(info->base + S3C2410_RTCCON)); 1add6781c85d7e Ben Dooks 2006-07-01 452 51b7616e36fbad Yauhen Kharuzhy 2008-10-29 453 device_init_wakeup(&pdev->dev, 1); 51b7616e36fbad Yauhen Kharuzhy 2008-10-29 454 dba28c37f23a09 Sam Protsenko 2021-10-21 455 info->rtc = devm_rtc_allocate_device(&pdev->dev); 19be09f51d3610 Chanwoo Choi 2014-10-13 456 if (IS_ERR(info->rtc)) { 19be09f51d3610 Chanwoo Choi 2014-10-13 457 ret = PTR_ERR(info->rtc); 1add6781c85d7e Ben Dooks 2006-07-01 458 goto err_nortc; 1add6781c85d7e Ben Dooks 2006-07-01 459 } 1add6781c85d7e Ben Dooks 2006-07-01 460 dba28c37f23a09 Sam Protsenko 2021-10-21 461 info->rtc->ops = &s3c_rtcops; a5feda3b361e11 Sam Protsenko 2021-10-21 462 info->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; a5feda3b361e11 Sam Protsenko 2021-10-21 463 info->rtc->range_max = RTC_TIMESTAMP_END_2099; dba28c37f23a09 Sam Protsenko 2021-10-21 464 dba28c37f23a09 Sam Protsenko 2021-10-21 465 ret = devm_rtc_register_device(info->rtc); dba28c37f23a09 Sam Protsenko 2021-10-21 466 if (ret) dba28c37f23a09 Sam Protsenko 2021-10-21 467 goto err_nortc; dba28c37f23a09 Sam Protsenko 2021-10-21 468 19be09f51d3610 Chanwoo Choi 2014-10-13 469 ret = devm_request_irq(&pdev->dev, info->irq_alarm, s3c_rtc_alarmirq, 19be09f51d3610 Chanwoo Choi 2014-10-13 470 0, "s3c2410-rtc alarm", info); 19be09f51d3610 Chanwoo Choi 2014-10-13 471 if (ret) { 19be09f51d3610 Chanwoo Choi 2014-10-13 472 dev_err(&pdev->dev, "IRQ%d error %d\n", info->irq_alarm, ret); 19be09f51d3610 Chanwoo Choi 2014-10-13 473 goto err_nortc; 19be09f51d3610 Chanwoo Choi 2014-10-13 474 } eaa6e4dd4bf243 Maurus Cuelenaere 2010-06-04 475 5a5b614ba61cc2 Marek Szyprowski 2019-01-21 476 s3c_rtc_disable_clk(info); 5a5b614ba61cc2 Marek Szyprowski 2019-01-21 477 1add6781c85d7e Ben Dooks 2006-07-01 478 return 0; 1add6781c85d7e Ben Dooks 2006-07-01 479 1add6781c85d7e Ben Dooks 2006-07-01 480 err_nortc: ae05c95074e0ea Chanwoo Choi 2014-10-13 481 if (info->data->disable) ae05c95074e0ea Chanwoo Choi 2014-10-13 482 info->data->disable(info); 1add6781c85d7e Ben Dooks 2006-07-01 @483 } 1add6781c85d7e Ben Dooks 2006-07-01 484 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki