Re: [PATCH 2/2] clocksource/drivers: Add Realtek Otto timer driver

From: kernel test robot
Date: Sun Jan 16 2022 - 20:29:29 EST


Hi Sander,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20220116]
[cannot apply to tip/timers/core linux/master linus/master daniel-lezcano/clockevents/next v5.16 v5.16-rc8 v5.16-rc7 v5.16]
[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/Sander-Vanheule/Realtek-Otto-timer-counter-support/20220117-054003
base: 70e6f1b39929bf6755a9c55b79fe720f7c8b9436
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20220117/202201170911.q3u7GptA-lkp@xxxxxxxxx/config)
compiler: sparc64-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/1c346209c6655c06ab28df22f821ffa06a792a14
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sander-Vanheule/Realtek-Otto-timer-counter-support/20220117-054003
git checkout 1c346209c6655c06ab28df22f821ffa06a792a14
# 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=sparc SHELL=/bin/bash drivers/clocksource/

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

All warnings (new ones prefixed by >>):

drivers/clocksource/timer-realtek-otto.c: In function 'otto_tc_init':
drivers/clocksource/timer-realtek-otto.c:182:16: error: implicit declaration of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
182 | ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
| ^~~~~~~
| d_alloc
>> drivers/clocksource/timer-realtek-otto.c:182:14: warning: assignment to 'struct otto_tc_ctrl *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
182 | ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
| ^
drivers/clocksource/timer-realtek-otto.c:212:9: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
212 | kfree(ctrl);
| ^~~~~
cc1: some warnings being treated as errors


vim +182 drivers/clocksource/timer-realtek-otto.c

176
177 static int __init otto_tc_init(struct device_node *node)
178 {
179 struct otto_tc_ctrl *ctrl;
180 int err;
181
> 182 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);

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