Re: [PATCH 2/3] m68k: mac: use time64_t in RTC handling

From: kbuild test robot
Date: Mon Jun 18 2018 - 12:56:13 EST


Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.18-rc1 next-20180618]
[cannot apply to m68k/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/powerpc-mac-fix-rtc-read-functions/20180618-222412
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: m68k-multi_defconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=m68k

All errors (new ones prefixed by >>):

arch/m68k/mac/misc.c: In function 'cuda_read_time':
>> arch/m68k/mac/misc.c:48:36: error: expected expression before '|' token
time = (u32)((req.reply[3] << 24( | (req.reply[4] << 16) |
^
>> arch/m68k/mac/misc.c:48:32: error: called object is not a function or function pointer
time = (u32)((req.reply[3] << 24( | (req.reply[4] << 16) |
^~
>> arch/m68k/mac/misc.c:49:43: error: expected ')' before ';' token
(req.reply[5] << 8) | req.reply[6]);
^
arch/m68k/mac/misc.c:55:1: error: expected ')' before '}' token
}
^
>> arch/m68k/mac/misc.c:55:1: error: expected ';' before '}' token
arch/m68k/mac/misc.c:55:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

vim +48 arch/m68k/mac/misc.c

36
37 #ifdef CONFIG_ADB_CUDA
38 static time64_t cuda_read_time(void)
39 {
40 struct adb_request req;
41 time64_t time;
42
43 if (cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_GET_TIME) < 0)
44 return 0;
45 while (!req.complete)
46 cuda_poll();
47
> 48 time = (u32)((req.reply[3] << 24( | (req.reply[4] << 16) |
> 49 (req.reply[5] << 8) | req.reply[6]);
50
51 /* it's either after year 2040, or the RTC has gone backwards */
52 WARN_ON(time < RTC_OFFSET);
53
54 return time - RTC_OFFSET;
> 55 }
56

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip