tree:
https://android.googlesource.com/kernel/omap mirror-android-4.19-r
head: 0b145f91d8fdbe39900356c8ad3ba4e41ce95fab
commit: 0b145f91d8fdbe39900356c8ad3ba4e41ce95fab [1/1] ANDROID: rtc: class: support
hctosys from modular RTC drivers
config: arm-randconfig-r032-20210409 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add android-omap
https://android.googlesource.com/kernel/omap
git fetch --no-tags android-omap mirror-android-4.19-r
git checkout 0b145f91d8fdbe39900356c8ad3ba4e41ce95fab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/rtc/hctosys.c:27:5: warning: no previous prototype for
'rtc_hctosys' [-Wmissing-prototypes]
27 | int rtc_hctosys(void)
| ^~~~~~~~~~~
vim +/rtc_hctosys +27 drivers/rtc/hctosys.c
15
16 /* IMPORTANT: the RTC only stores whole seconds. It is arbitrary
17 * whether it stores the most close value or the value with partial
18 * seconds truncated. However, it is important that we use it to store
19 * the truncated value. This is because otherwise it is necessary,
20 * in an rtc sync function, to read both xtime.tv_sec and
21 * xtime.tv_nsec. On some processors (i.e. ARM), an atomic read
22 * of >32bits is not possible. So storing the most close value would
23 * slow down the sync API. So here we have the truncated value and
24 * the best guess is to add 0.5s.
25 */
26
27 int rtc_hctosys(void)
28 {
29 int err = -ENODEV;
30 struct rtc_time tm;
31 struct timespec64 tv64 = {
32 .tv_nsec = NSEC_PER_SEC >> 1,
33 };
34 struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
35
36 if (rtc == NULL) {
37 pr_info("unable to open rtc device (%s)\n",
38 CONFIG_RTC_HCTOSYS_DEVICE);
39 goto err_open;
40 }
41
42 err = rtc_read_time(rtc, &tm);
43 if (err) {
44 dev_err(rtc->dev.parent,
45 "hctosys: unable to read the hardware clock\n");
46 goto err_read;
47
48 }
49
50 tv64.tv_sec = rtc_tm_to_time64(&tm);
51
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org