[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202503020150.LkqTktVQ-lkp@intel.com>
Date: Sun, 2 Mar 2025 01:47:17 +0800
From: kernel test robot <lkp@...el.com>
To: André Draszik <andre.draszik@...aro.org>,
Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Joel Stanley <joel@....id.au>,
Andrew Jeffery <andrew@...econstruct.com.au>,
Hans Ulli Kroll <ulli.kroll@...glemail.com>,
Linus Walleij <linus.walleij@...aro.org>,
Neil Armstrong <neil.armstrong@...aro.org>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Tóth János <gomba007@...il.com>,
Dianlong Li <long17.cool@....com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-aspeed@...ts.ozlabs.org,
linux-amlogic@...ts.infradead.org,
André Draszik <andre.draszik@...aro.org>
Subject: Re: [PATCH 02/18] rtc: s5m: drop needless struct s5m_rtc_info::i2c
member
Hi André,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 0226d0ce98a477937ed295fb7df4cc30b46fc304]
url: https://github.com/intel-lab-lkp/linux/commits/Andr-Draszik/rtc-max77686-drop-needless-struct-max77686_rtc_info-rtc-member/20250228-221320
base: 0226d0ce98a477937ed295fb7df4cc30b46fc304
patch link: https://lore.kernel.org/r/20250228-rtc-cleanups-v1-2-b44cec078481%40linaro.org
patch subject: [PATCH 02/18] rtc: s5m: drop needless struct s5m_rtc_info::i2c member
config: arm-randconfig-004-20250301 (https://download.01.org/0day-ci/archive/20250302/202503020150.LkqTktVQ-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 14170b16028c087ca154878f5ed93d3089a965c6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250302/202503020150.LkqTktVQ-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503020150.LkqTktVQ-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/rtc/rtc-s5m.c:11:
In file included from include/linux/i2c.h:19:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:21:
In file included from include/linux/mm.h:2287:
include/linux/vmstat.h:507:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
507 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/rtc/rtc-s5m.c:678:46: warning: variable 'i2c' is uninitialized when used here [-Wuninitialized]
678 | i2c = devm_i2c_new_dummy_device(&pdev->dev, i2c->adapter,
| ^~~
drivers/rtc/rtc-s5m.c:642:24: note: initialize the variable 'i2c' to silence this warning
642 | struct i2c_client *i2c;
| ^
| = NULL
2 warnings generated.
vim +/i2c +678 drivers/rtc/rtc-s5m.c
637
638 static int s5m_rtc_probe(struct platform_device *pdev)
639 {
640 struct sec_pmic_dev *s5m87xx = dev_get_drvdata(pdev->dev.parent);
641 struct s5m_rtc_info *info;
642 struct i2c_client *i2c;
643 const struct regmap_config *regmap_cfg;
644 int ret, alarm_irq;
645
646 info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
647 if (!info)
648 return -ENOMEM;
649
650 switch (platform_get_device_id(pdev)->driver_data) {
651 case S2MPS15X:
652 regmap_cfg = &s2mps14_rtc_regmap_config;
653 info->regs = &s2mps15_rtc_regs;
654 alarm_irq = S2MPS14_IRQ_RTCA0;
655 break;
656 case S2MPS14X:
657 regmap_cfg = &s2mps14_rtc_regmap_config;
658 info->regs = &s2mps14_rtc_regs;
659 alarm_irq = S2MPS14_IRQ_RTCA0;
660 break;
661 case S2MPS13X:
662 regmap_cfg = &s2mps14_rtc_regmap_config;
663 info->regs = &s2mps13_rtc_regs;
664 alarm_irq = S2MPS14_IRQ_RTCA0;
665 break;
666 case S5M8767X:
667 regmap_cfg = &s5m_rtc_regmap_config;
668 info->regs = &s5m_rtc_regs;
669 alarm_irq = S5M8767_IRQ_RTCA1;
670 break;
671 default:
672 dev_err(&pdev->dev,
673 "Device type %lu is not supported by RTC driver\n",
674 platform_get_device_id(pdev)->driver_data);
675 return -ENODEV;
676 }
677
> 678 i2c = devm_i2c_new_dummy_device(&pdev->dev, i2c->adapter,
679 RTC_I2C_ADDR);
680 if (IS_ERR(i2c)) {
681 dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n");
682 return PTR_ERR(i2c);
683 }
684
685 info->regmap = devm_regmap_init_i2c(i2c, regmap_cfg);
686 if (IS_ERR(info->regmap)) {
687 ret = PTR_ERR(info->regmap);
688 dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
689 ret);
690 return ret;
691 }
692
693 info->dev = &pdev->dev;
694 info->s5m87xx = s5m87xx;
695 info->device_type = platform_get_device_id(pdev)->driver_data;
696
697 if (s5m87xx->irq_data) {
698 info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
699 if (info->irq <= 0) {
700 dev_err(&pdev->dev, "Failed to get virtual IRQ %d\n",
701 alarm_irq);
702 return -EINVAL;
703 }
704 }
705
706 platform_set_drvdata(pdev, info);
707
708 ret = s5m8767_rtc_init_reg(info);
709 if (ret)
710 return ret;
711
712 info->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
713 if (IS_ERR(info->rtc_dev))
714 return PTR_ERR(info->rtc_dev);
715
716 info->rtc_dev->ops = &s5m_rtc_ops;
717
718 info->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
719 info->rtc_dev->range_max = RTC_TIMESTAMP_END_2099;
720
721 if (!info->irq) {
722 clear_bit(RTC_FEATURE_ALARM, info->rtc_dev->features);
723 } else {
724 ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL,
725 s5m_rtc_alarm_irq, 0, "rtc-alarm0",
726 info);
727 if (ret < 0) {
728 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
729 info->irq, ret);
730 return ret;
731 }
732 device_init_wakeup(&pdev->dev, true);
733 }
734
735 return devm_rtc_register_device(info->rtc_dev);
736 }
737
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists