lkml.org 
[lkml]   [2022]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] clocksource/drivers: Add Realtek Otto timer driver
From
Date
On Mon, 2022-01-17 at 09:28 +0800, kernel test robot wrote:
>    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);

I'll include linux/slab.h in v2.

Best,
Sander

\
 
 \ /
  Last update: 2022-01-17 09:04    [W:0.047 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site