From: kernel test robot <lkp@intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Krzysztof Kozlowski <krzk@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v3 2/2] rtc: s5m: use devm_i2c_new_dummy_device()
Date: Thu, 7 Jan 2021 23:00:26 +0800 [thread overview]
Message-ID: <202101072247.tEBwIjXO-lkp@intel.com> (raw)
In-Reply-To: <20210107134203.9388-2-brgl@bgdev.pl>
[-- Attachment #1: Type: text/plain, Size: 11912 bytes --]
Hi Bartosz,
I love your patch! Perhaps something to improve:
[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on v5.11-rc2 next-20210104]
[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]
url: https://github.com/0day-ci/linux/commits/Bartosz-Golaszewski/rtc-s5m-check-the-return-value-of-s5m8767_rtc_init_reg/20210107-214351
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: i386-randconfig-a016-20210107 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/acac325366af9adafe0057352be2e0567f59d099
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bartosz-Golaszewski/rtc-s5m-check-the-return-value-of-s5m8767_rtc_init_reg/20210107-214351
git checkout acac325366af9adafe0057352be2e0567f59d099
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/i2c.h:13,
from drivers/rtc/rtc-s5m.c:11:
drivers/rtc/rtc-s5m.c: In function 's5m_rtc_probe':
>> drivers/rtc/rtc-s5m.c:772:23: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
772 | dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/rtc/rtc-s5m.c:772:3: note: in expansion of macro 'dev_err'
772 | dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
| ^~~~~~~
drivers/rtc/rtc-s5m.c:772:62: note: format string is defined here
772 | dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
| ~^
| |
| int
| %ld
vim +772 drivers/rtc/rtc-s5m.c
5bccae6ec458704 Sangbeom Kim 2013-11-12 712
5bccae6ec458704 Sangbeom Kim 2013-11-12 713 static int s5m_rtc_probe(struct platform_device *pdev)
5bccae6ec458704 Sangbeom Kim 2013-11-12 714 {
5bccae6ec458704 Sangbeom Kim 2013-11-12 715 struct sec_pmic_dev *s5m87xx = dev_get_drvdata(pdev->dev.parent);
5bccae6ec458704 Sangbeom Kim 2013-11-12 716 struct sec_platform_data *pdata = s5m87xx->pdata;
5bccae6ec458704 Sangbeom Kim 2013-11-12 717 struct s5m_rtc_info *info;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 718 const struct regmap_config *regmap_cfg;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 719 int ret, alarm_irq;
5bccae6ec458704 Sangbeom Kim 2013-11-12 720
5bccae6ec458704 Sangbeom Kim 2013-11-12 721 if (!pdata) {
5bccae6ec458704 Sangbeom Kim 2013-11-12 722 dev_err(pdev->dev.parent, "Platform data not supplied\n");
5bccae6ec458704 Sangbeom Kim 2013-11-12 723 return -ENODEV;
5bccae6ec458704 Sangbeom Kim 2013-11-12 724 }
5bccae6ec458704 Sangbeom Kim 2013-11-12 725
5bccae6ec458704 Sangbeom Kim 2013-11-12 726 info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
5bccae6ec458704 Sangbeom Kim 2013-11-12 727 if (!info)
5bccae6ec458704 Sangbeom Kim 2013-11-12 728 return -ENOMEM;
5bccae6ec458704 Sangbeom Kim 2013-11-12 729
94f919225890a1a Krzysztof Kozlowski 2015-04-16 730 switch (platform_get_device_id(pdev)->driver_data) {
a65e5efa7c5faa8 Alim Akhtar 2015-11-20 731 case S2MPS15X:
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 732 regmap_cfg = &s2mps14_rtc_regmap_config;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 733 info->regs = &s2mps15_rtc_regs;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 734 alarm_irq = S2MPS14_IRQ_RTCA0;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 735 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 736 case S2MPS14X:
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 737 regmap_cfg = &s2mps14_rtc_regmap_config;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 738 info->regs = &s2mps14_rtc_regs;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 739 alarm_irq = S2MPS14_IRQ_RTCA0;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 740 break;
5281f94ae7f54d2 Krzysztof Kozlowski 2015-04-16 741 case S2MPS13X:
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 742 regmap_cfg = &s2mps14_rtc_regmap_config;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 743 info->regs = &s2mps13_rtc_regs;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 744 alarm_irq = S2MPS14_IRQ_RTCA0;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 745 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 746 case S5M8763X:
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 747 regmap_cfg = &s5m_rtc_regmap_config;
f8b23bbdad5dfb5 Krzysztof Kozlowski 2014-06-10 748 info->regs = &s5m_rtc_regs;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 749 alarm_irq = S5M8763_IRQ_ALARM0;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 750 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 751 case S5M8767X:
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 752 regmap_cfg = &s5m_rtc_regmap_config;
f8b23bbdad5dfb5 Krzysztof Kozlowski 2014-06-10 753 info->regs = &s5m_rtc_regs;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 754 alarm_irq = S5M8767_IRQ_RTCA1;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 755 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 756 default:
94f919225890a1a Krzysztof Kozlowski 2015-04-16 757 dev_err(&pdev->dev,
94f919225890a1a Krzysztof Kozlowski 2015-04-16 758 "Device type %lu is not supported by RTC driver\n",
94f919225890a1a Krzysztof Kozlowski 2015-04-16 759 platform_get_device_id(pdev)->driver_data);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 760 return -ENODEV;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 761 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 762
acac325366af9ad Bartosz Golaszewski 2021-01-07 763 info->i2c = devm_i2c_new_dummy_device(&pdev->dev, s5m87xx->i2c->adapter,
acac325366af9ad Bartosz Golaszewski 2021-01-07 764 RTC_I2C_ADDR);
aae364d2a88897e Wolfram Sang 2019-07-22 765 if (IS_ERR(info->i2c)) {
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 766 dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n");
aae364d2a88897e Wolfram Sang 2019-07-22 767 return PTR_ERR(info->i2c);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 768 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 769
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 770 info->regmap = devm_regmap_init_i2c(info->i2c, regmap_cfg);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 771 if (IS_ERR(info->regmap)) {
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 @772 dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
acac325366af9ad Bartosz Golaszewski 2021-01-07 773 PTR_ERR(info->regmap));
acac325366af9ad Bartosz Golaszewski 2021-01-07 774 return PTR_ERR(info->regmap);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 775 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 776
5bccae6ec458704 Sangbeom Kim 2013-11-12 777 info->dev = &pdev->dev;
5bccae6ec458704 Sangbeom Kim 2013-11-12 778 info->s5m87xx = s5m87xx;
94f919225890a1a Krzysztof Kozlowski 2015-04-16 779 info->device_type = platform_get_device_id(pdev)->driver_data;
5bccae6ec458704 Sangbeom Kim 2013-11-12 780
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 781 if (s5m87xx->irq_data) {
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 782 info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 783 if (info->irq <= 0) {
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 784 dev_err(&pdev->dev, "Failed to get virtual IRQ %d\n",
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 785 alarm_irq);
acac325366af9ad Bartosz Golaszewski 2021-01-07 786 return -EINVAL;
5bccae6ec458704 Sangbeom Kim 2013-11-12 787 }
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 788 }
5bccae6ec458704 Sangbeom Kim 2013-11-12 789
5bccae6ec458704 Sangbeom Kim 2013-11-12 790 platform_set_drvdata(pdev, info);
5bccae6ec458704 Sangbeom Kim 2013-11-12 791
5bccae6ec458704 Sangbeom Kim 2013-11-12 792 ret = s5m8767_rtc_init_reg(info);
09ffffcec089209 Bartosz Golaszewski 2021-01-07 793 if (ret)
09ffffcec089209 Bartosz Golaszewski 2021-01-07 794 return ret;
5bccae6ec458704 Sangbeom Kim 2013-11-12 795
5bccae6ec458704 Sangbeom Kim 2013-11-12 796 device_init_wakeup(&pdev->dev, 1);
5bccae6ec458704 Sangbeom Kim 2013-11-12 797
5bccae6ec458704 Sangbeom Kim 2013-11-12 798 info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc",
5bccae6ec458704 Sangbeom Kim 2013-11-12 799 &s5m_rtc_ops, THIS_MODULE);
5bccae6ec458704 Sangbeom Kim 2013-11-12 800
acac325366af9ad Bartosz Golaszewski 2021-01-07 801 if (IS_ERR(info->rtc_dev))
acac325366af9ad Bartosz Golaszewski 2021-01-07 802 return PTR_ERR(info->rtc_dev);
5bccae6ec458704 Sangbeom Kim 2013-11-12 803
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 804 if (!info->irq) {
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 805 dev_info(&pdev->dev, "Alarm IRQ not available\n");
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 806 return 0;
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 807 }
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 808
5bccae6ec458704 Sangbeom Kim 2013-11-12 809 ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL,
5bccae6ec458704 Sangbeom Kim 2013-11-12 810 s5m_rtc_alarm_irq, 0, "rtc-alarm0",
5bccae6ec458704 Sangbeom Kim 2013-11-12 811 info);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 812 if (ret < 0) {
5bccae6ec458704 Sangbeom Kim 2013-11-12 813 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
5bccae6ec458704 Sangbeom Kim 2013-11-12 814 info->irq, ret);
5bccae6ec458704 Sangbeom Kim 2013-11-12 815 return ret;
5bccae6ec458704 Sangbeom Kim 2013-11-12 816 }
5bccae6ec458704 Sangbeom Kim 2013-11-12 817
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 818 return 0;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 819 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 820
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30800 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 2/2] rtc: s5m: use devm_i2c_new_dummy_device()
Date: Thu, 07 Jan 2021 23:00:26 +0800 [thread overview]
Message-ID: <202101072247.tEBwIjXO-lkp@intel.com> (raw)
In-Reply-To: <20210107134203.9388-2-brgl@bgdev.pl>
[-- Attachment #1: Type: text/plain, Size: 12078 bytes --]
Hi Bartosz,
I love your patch! Perhaps something to improve:
[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on v5.11-rc2 next-20210104]
[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]
url: https://github.com/0day-ci/linux/commits/Bartosz-Golaszewski/rtc-s5m-check-the-return-value-of-s5m8767_rtc_init_reg/20210107-214351
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: i386-randconfig-a016-20210107 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/acac325366af9adafe0057352be2e0567f59d099
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bartosz-Golaszewski/rtc-s5m-check-the-return-value-of-s5m8767_rtc_init_reg/20210107-214351
git checkout acac325366af9adafe0057352be2e0567f59d099
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/i2c.h:13,
from drivers/rtc/rtc-s5m.c:11:
drivers/rtc/rtc-s5m.c: In function 's5m_rtc_probe':
>> drivers/rtc/rtc-s5m.c:772:23: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
772 | dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/rtc/rtc-s5m.c:772:3: note: in expansion of macro 'dev_err'
772 | dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
| ^~~~~~~
drivers/rtc/rtc-s5m.c:772:62: note: format string is defined here
772 | dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
| ~^
| |
| int
| %ld
vim +772 drivers/rtc/rtc-s5m.c
5bccae6ec458704 Sangbeom Kim 2013-11-12 712
5bccae6ec458704 Sangbeom Kim 2013-11-12 713 static int s5m_rtc_probe(struct platform_device *pdev)
5bccae6ec458704 Sangbeom Kim 2013-11-12 714 {
5bccae6ec458704 Sangbeom Kim 2013-11-12 715 struct sec_pmic_dev *s5m87xx = dev_get_drvdata(pdev->dev.parent);
5bccae6ec458704 Sangbeom Kim 2013-11-12 716 struct sec_platform_data *pdata = s5m87xx->pdata;
5bccae6ec458704 Sangbeom Kim 2013-11-12 717 struct s5m_rtc_info *info;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 718 const struct regmap_config *regmap_cfg;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 719 int ret, alarm_irq;
5bccae6ec458704 Sangbeom Kim 2013-11-12 720
5bccae6ec458704 Sangbeom Kim 2013-11-12 721 if (!pdata) {
5bccae6ec458704 Sangbeom Kim 2013-11-12 722 dev_err(pdev->dev.parent, "Platform data not supplied\n");
5bccae6ec458704 Sangbeom Kim 2013-11-12 723 return -ENODEV;
5bccae6ec458704 Sangbeom Kim 2013-11-12 724 }
5bccae6ec458704 Sangbeom Kim 2013-11-12 725
5bccae6ec458704 Sangbeom Kim 2013-11-12 726 info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
5bccae6ec458704 Sangbeom Kim 2013-11-12 727 if (!info)
5bccae6ec458704 Sangbeom Kim 2013-11-12 728 return -ENOMEM;
5bccae6ec458704 Sangbeom Kim 2013-11-12 729
94f919225890a1a Krzysztof Kozlowski 2015-04-16 730 switch (platform_get_device_id(pdev)->driver_data) {
a65e5efa7c5faa8 Alim Akhtar 2015-11-20 731 case S2MPS15X:
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 732 regmap_cfg = &s2mps14_rtc_regmap_config;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 733 info->regs = &s2mps15_rtc_regs;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 734 alarm_irq = S2MPS14_IRQ_RTCA0;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 735 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 736 case S2MPS14X:
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 737 regmap_cfg = &s2mps14_rtc_regmap_config;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 738 info->regs = &s2mps14_rtc_regs;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 739 alarm_irq = S2MPS14_IRQ_RTCA0;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 740 break;
5281f94ae7f54d2 Krzysztof Kozlowski 2015-04-16 741 case S2MPS13X:
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 742 regmap_cfg = &s2mps14_rtc_regmap_config;
8ae83b6f76fc74e Krzysztof Kozlowski 2015-12-30 743 info->regs = &s2mps13_rtc_regs;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 744 alarm_irq = S2MPS14_IRQ_RTCA0;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 745 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 746 case S5M8763X:
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 747 regmap_cfg = &s5m_rtc_regmap_config;
f8b23bbdad5dfb5 Krzysztof Kozlowski 2014-06-10 748 info->regs = &s5m_rtc_regs;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 749 alarm_irq = S5M8763_IRQ_ALARM0;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 750 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 751 case S5M8767X:
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 752 regmap_cfg = &s5m_rtc_regmap_config;
f8b23bbdad5dfb5 Krzysztof Kozlowski 2014-06-10 753 info->regs = &s5m_rtc_regs;
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 754 alarm_irq = S5M8767_IRQ_RTCA1;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 755 break;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 756 default:
94f919225890a1a Krzysztof Kozlowski 2015-04-16 757 dev_err(&pdev->dev,
94f919225890a1a Krzysztof Kozlowski 2015-04-16 758 "Device type %lu is not supported by RTC driver\n",
94f919225890a1a Krzysztof Kozlowski 2015-04-16 759 platform_get_device_id(pdev)->driver_data);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 760 return -ENODEV;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 761 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 762
acac325366af9ad Bartosz Golaszewski 2021-01-07 763 info->i2c = devm_i2c_new_dummy_device(&pdev->dev, s5m87xx->i2c->adapter,
acac325366af9ad Bartosz Golaszewski 2021-01-07 764 RTC_I2C_ADDR);
aae364d2a88897e Wolfram Sang 2019-07-22 765 if (IS_ERR(info->i2c)) {
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 766 dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n");
aae364d2a88897e Wolfram Sang 2019-07-22 767 return PTR_ERR(info->i2c);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 768 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 769
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 770 info->regmap = devm_regmap_init_i2c(info->i2c, regmap_cfg);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 771 if (IS_ERR(info->regmap)) {
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 @772 dev_err(&pdev->dev, "Failed to allocate RTC register map: %d\n",
acac325366af9ad Bartosz Golaszewski 2021-01-07 773 PTR_ERR(info->regmap));
acac325366af9ad Bartosz Golaszewski 2021-01-07 774 return PTR_ERR(info->regmap);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 775 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 776
5bccae6ec458704 Sangbeom Kim 2013-11-12 777 info->dev = &pdev->dev;
5bccae6ec458704 Sangbeom Kim 2013-11-12 778 info->s5m87xx = s5m87xx;
94f919225890a1a Krzysztof Kozlowski 2015-04-16 779 info->device_type = platform_get_device_id(pdev)->driver_data;
5bccae6ec458704 Sangbeom Kim 2013-11-12 780
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 781 if (s5m87xx->irq_data) {
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 782 info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 783 if (info->irq <= 0) {
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 784 dev_err(&pdev->dev, "Failed to get virtual IRQ %d\n",
a0347f20aaacc96 Krzysztof Kozlowski 2014-06-10 785 alarm_irq);
acac325366af9ad Bartosz Golaszewski 2021-01-07 786 return -EINVAL;
5bccae6ec458704 Sangbeom Kim 2013-11-12 787 }
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 788 }
5bccae6ec458704 Sangbeom Kim 2013-11-12 789
5bccae6ec458704 Sangbeom Kim 2013-11-12 790 platform_set_drvdata(pdev, info);
5bccae6ec458704 Sangbeom Kim 2013-11-12 791
5bccae6ec458704 Sangbeom Kim 2013-11-12 792 ret = s5m8767_rtc_init_reg(info);
09ffffcec089209 Bartosz Golaszewski 2021-01-07 793 if (ret)
09ffffcec089209 Bartosz Golaszewski 2021-01-07 794 return ret;
5bccae6ec458704 Sangbeom Kim 2013-11-12 795
5bccae6ec458704 Sangbeom Kim 2013-11-12 796 device_init_wakeup(&pdev->dev, 1);
5bccae6ec458704 Sangbeom Kim 2013-11-12 797
5bccae6ec458704 Sangbeom Kim 2013-11-12 798 info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc",
5bccae6ec458704 Sangbeom Kim 2013-11-12 799 &s5m_rtc_ops, THIS_MODULE);
5bccae6ec458704 Sangbeom Kim 2013-11-12 800
acac325366af9ad Bartosz Golaszewski 2021-01-07 801 if (IS_ERR(info->rtc_dev))
acac325366af9ad Bartosz Golaszewski 2021-01-07 802 return PTR_ERR(info->rtc_dev);
5bccae6ec458704 Sangbeom Kim 2013-11-12 803
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 804 if (!info->irq) {
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 805 dev_info(&pdev->dev, "Alarm IRQ not available\n");
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 806 return 0;
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 807 }
b7d5b9a9686674e Bartlomiej Zolnierkiewicz 2014-08-29 808
5bccae6ec458704 Sangbeom Kim 2013-11-12 809 ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL,
5bccae6ec458704 Sangbeom Kim 2013-11-12 810 s5m_rtc_alarm_irq, 0, "rtc-alarm0",
5bccae6ec458704 Sangbeom Kim 2013-11-12 811 info);
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 812 if (ret < 0) {
5bccae6ec458704 Sangbeom Kim 2013-11-12 813 dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
5bccae6ec458704 Sangbeom Kim 2013-11-12 814 info->irq, ret);
5bccae6ec458704 Sangbeom Kim 2013-11-12 815 return ret;
5bccae6ec458704 Sangbeom Kim 2013-11-12 816 }
5bccae6ec458704 Sangbeom Kim 2013-11-12 817
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 818 return 0;
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 819 }
e349c910e2398cb Krzysztof Kozlowski 2014-04-14 820
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30800 bytes --]
next prev parent reply other threads:[~2021-01-07 15:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 13:42 [PATCH 1/2] rtc: s5m: check the return value of s5m8767_rtc_init_reg() Bartosz Golaszewski
2021-01-07 13:42 ` [PATCH v3 2/2] rtc: s5m: use devm_i2c_new_dummy_device() Bartosz Golaszewski
2021-01-07 15:00 ` kernel test robot [this message]
2021-01-07 15:00 ` kernel test robot
2021-01-07 18:20 ` kernel test robot
2021-01-07 18:20 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101072247.tEBwIjXO-lkp@intel.com \
--to=lkp@intel.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=b.zolnierkie@samsung.com \
--cc=bgolaszewski@baylibre.com \
--cc=brgl@bgdev.pl \
--cc=kbuild-all@lists.01.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.