Re: [PATCH v6 3/4] clocksource/drivers: Add a goldfish-timer clocksource

From: kernel test robot
Date: Fri Jan 14 2022 - 03:33:41 EST


Hi Laurent,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on geert-m68k/for-next]
[also build test ERROR on linux/master v5.16]
[cannot apply to tip/timers/core linus/master next-20220114]
[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/Laurent-Vivier/m68k-Add-Virtual-M68k-Machine/20220114-042103
base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git for-next
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20220114/202201141640.iSJ8IkCj-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/7e887e6ec0d7193083a2f0020007688db2318c76
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Laurent-Vivier/m68k-Add-Virtual-M68k-Machine/20220114-042103
git checkout 7e887e6ec0d7193083a2f0020007688db2318c76
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/clocksource/timer-goldfish.c: In function 'goldfish_timer_init':
>> drivers/clocksource/timer-goldfish.c:94:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
94 | timerdrv = kzalloc(sizeof(*timerdrv), GFP_KERNEL);
| ^~~~~~~
| vzalloc
drivers/clocksource/timer-goldfish.c:94:18: warning: assignment to 'struct goldfish_timer *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
94 | timerdrv = kzalloc(sizeof(*timerdrv), GFP_KERNEL);
| ^
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for RTC_CLASS
Depends on !S390
Selected by
- GOLDFISH_TIMER && GENERIC_CLOCKEVENTS
WARNING: unmet direct dependencies detected for RTC_DRV_GOLDFISH
Depends on RTC_CLASS && HAS_IOMEM
Selected by
- GOLDFISH_TIMER && GENERIC_CLOCKEVENTS


vim +94 drivers/clocksource/timer-goldfish.c

88
89 void __init goldfish_timer_init(int irq, void __iomem *base)
90 {
91 struct goldfish_timer *timerdrv;
92 int ret;
93
> 94 timerdrv = kzalloc(sizeof(*timerdrv), GFP_KERNEL);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx