[PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support
kernel test robot
lkp at intel.com
Sat Oct 19 02:43:51 PDT 2024
Hi Ciprian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on robh/for-next arm64/for-next/core linus/master v6.12-rc3 next-20241018]
[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/Ciprian-Costea/dt-bindings-rtc-add-schema-for-NXP-S32G2-S32G3-SoCs/20241015-185302
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20241015105133.656360-3-ciprianmarian.costea%40oss.nxp.com
patch subject: [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support
config: alpha-randconfig-r071-20241019 (https://download.01.org/0day-ci/archive/20241019/202410191711.oc5s2ZYc-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.0
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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410191711.oc5s2ZYc-lkp@intel.com/
smatch warnings:
drivers/rtc/rtc-s32g.c:221 s32g_rtc_read_time() warn: unsigned 'sec' is never less than zero.
drivers/rtc/rtc-s32g.c:221 s32g_rtc_read_time() warn: error code type promoted to positive: 'sec'
drivers/rtc/rtc-s32g.c:239 s32g_rtc_read_alarm() warn: unsigned 'sec' is never less than zero.
drivers/rtc/rtc-s32g.c:239 s32g_rtc_read_alarm() warn: error code type promoted to positive: 'sec'
vim +/sec +221 drivers/rtc/rtc-s32g.c
210
211 static int s32g_rtc_read_time(struct device *dev,
212 struct rtc_time *tm)
213 {
214 struct rtc_priv *priv = dev_get_drvdata(dev);
215 u64 sec;
216
217 if (!tm)
218 return -EINVAL;
219
220 sec = s32g_rtc_get_time_or_alrm(priv, RTCCNT_OFFSET);
> 221 if (sec < 0)
222 return -EINVAL;
223
224 rtc_time64_to_tm(sec, tm);
225
226 return 0;
227 }
228
229 static int s32g_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
230 {
231 struct rtc_priv *priv = dev_get_drvdata(dev);
232 u32 rtcc, sec_left;
233 u64 sec;
234
235 if (!alrm)
236 return -EINVAL;
237
238 sec = s32g_rtc_get_time_or_alrm(priv, RTCVAL_OFFSET);
> 239 if (sec < 0)
240 return -EINVAL;
241
242 rtc_time64_to_tm(sec, &alrm->time);
243
244 rtcc = ioread32(priv->rtc_base + RTCC_OFFSET);
245 alrm->enabled = sec && (rtcc & RTCC_RTCIE);
246
247 alrm->pending = 0;
248 if (alrm->enabled && !get_time_left(dev, priv, &sec_left))
249 alrm->pending = !!sec_left;
250
251 return 0;
252 }
253
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list