From: kernel test robot <lkp@intel.com>
To: Xianwei Zhao via B4 Relay
<devnull+xianwei.zhao.amlogic.com@kernel.org>,
Yiting Deng <yiting.deng@amlogic.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-amlogic@lists.infradead.org, linux-rtc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Xianwei Zhao <xianwei.zhao@amlogic.com>
Subject: Re: [PATCH 2/3] rtc: support for the Amlogic on-chip RTC
Date: Mon, 26 Aug 2024 20:57:58 +0800 [thread overview]
Message-ID: <202408262035.4BysJ5CK-lkp@intel.com> (raw)
In-Reply-To: <20240823-rtc-v1-2-6f70381da283@amlogic.com>
Hi Xianwei,
kernel test robot noticed the following build warnings:
[auto build test WARNING on dff71e5c6076314f3eefe700abd6af834c57bd64]
url: https://github.com/intel-lab-lkp/linux/commits/Xianwei-Zhao-via-B4-Relay/dt-bindings-rtc-Add-Amlogic-A311L2-and-A113X2-rtc/20240826-125504
base: dff71e5c6076314f3eefe700abd6af834c57bd64
patch link: https://lore.kernel.org/r/20240823-rtc-v1-2-6f70381da283%40amlogic.com
patch subject: [PATCH 2/3] rtc: support for the Amlogic on-chip RTC
config: i386-buildonly-randconfig-003-20240826 (https://download.01.org/0day-ci/archive/20240826/202408262035.4BysJ5CK-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240826/202408262035.4BysJ5CK-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408262035.4BysJ5CK-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/rtc/rtc-amlogic.c:159:6: warning: variable 'alarm_sec' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
159 | if (alarm->enabled) {
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-amlogic.c:173:19: note: uninitialized use occurs here
173 | alarm->enabled, alarm_sec);
| ^~~~~~~~~
include/linux/dev_printk.h:168:46: note: expanded from macro 'dev_dbg'
168 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/rtc/rtc-amlogic.c:159:2: note: remove the 'if' if its condition is always true
159 | if (alarm->enabled) {
| ^~~~~~~~~~~~~~~~~~~
drivers/rtc/rtc-amlogic.c:157:20: note: initialize the variable 'alarm_sec' to silence this warning
157 | time64_t alarm_sec;
| ^
| = 0
>> drivers/rtc/rtc-amlogic.c:565:34: warning: unused variable 'aml_rtc_device_id' [-Wunused-const-variable]
565 | static const struct of_device_id aml_rtc_device_id[] = {
| ^~~~~~~~~~~~~~~~~
2 warnings generated.
vim +159 drivers/rtc/rtc-amlogic.c
153
154 static int aml_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
155 {
156 struct aml_rtc_data *rtc = dev_get_drvdata(dev);
157 time64_t alarm_sec;
158
> 159 if (alarm->enabled) {
160 regmap_update_bits(rtc->map, RTC_CTRL,
161 RTC_ALRM0_EN, RTC_ALRM0_EN);
162 regmap_update_bits(rtc->map, RTC_INT_MASK,
163 RTC_ALRM0_IRQ_MSK, 0);
164
165 alarm_sec = rtc_tm_to_time64(&alarm->time);
166 if (alarm_sec > U32_MAX) {
167 dev_err(dev, "alarm value invalid!\n");
168 return -EINVAL;
169 }
170 aml_set_alarm(rtc, alarm_sec);
171 }
172 dev_dbg(dev, "%s: alarm->enabled=%d alarm_set=%llds\n", __func__,
173 alarm->enabled, alarm_sec);
174
175 return 0;
176 }
177
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-26 12:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 9:19 [PATCH 0/3] support for amlogic rtc Xianwei Zhao via B4 Relay
2024-08-23 9:19 ` [PATCH 1/3] dt-bindings: rtc: Add Amlogic A311L2 and A113X2 rtc Xianwei Zhao via B4 Relay
2024-08-23 15:51 ` Conor Dooley
2024-08-26 2:36 ` Xianwei Zhao
2024-08-23 9:19 ` [PATCH 2/3] rtc: support for the Amlogic on-chip RTC Xianwei Zhao via B4 Relay
2024-08-26 8:27 ` Krzysztof Kozlowski
2024-09-02 7:32 ` Xianwei Zhao
2024-08-26 9:45 ` Alexandre Belloni
2024-09-02 8:14 ` Xianwei Zhao
2024-09-02 20:19 ` Alexandre Belloni
2024-09-03 2:48 ` Xianwei Zhao
2024-08-26 12:57 ` kernel test robot [this message]
2024-08-26 13:19 ` kernel test robot
2024-08-23 9:19 ` [PATCH 3/3] MAINTAINERS: Add an entry for Amlogic RTC driver Xianwei Zhao via B4 Relay
2024-08-26 8:28 ` Krzysztof Kozlowski
2024-09-02 8:27 ` Xianwei Zhao
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=202408262035.4BysJ5CK-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+xianwei.zhao.amlogic.com@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=xianwei.zhao@amlogic.com \
--cc=yiting.deng@amlogic.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).