* [ti:ti-rt-linux-5.10.y 3603/3789] drivers/phy/ti/phy-j721e-wiz.c:518:17: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
@ 2021-04-23 22:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-23 22:06 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4011 bytes --]
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 376b7df95db951b7456af1e30d4ce451696190ee
commit: 7e470927fb259535419c0b074f58c34890f26e5f [3603/3789] phy: ti: j721e-wiz: Model the internal clocks without device tree input
config: nds32-randconfig-r024-20210423 (attached as .config)
compiler: nds32le-linux-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 ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 7e470927fb259535419c0b074f58c34890f26e5f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/phy/ti/phy-j721e-wiz.c: In function 'wiz_mux_clk_register':
>> drivers/phy/ti/phy-j721e-wiz.c:518:17: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
518 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
| ^~~~~~~
| vzalloc
>> drivers/phy/ti/phy-j721e-wiz.c:518:15: warning: assignment to 'const char **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
518 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
| ^
>> drivers/phy/ti/phy-j721e-wiz.c:556:2: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
556 | kfree(parent_names);
| ^~~~~
| vfree
cc1: some warnings being treated as errors
vim +518 drivers/phy/ti/phy-j721e-wiz.c
499
500 static int wiz_mux_clk_register(struct wiz *wiz, struct regmap_field *field,
501 const struct wiz_clk_mux_sel *mux_sel, int clk_index)
502 {
503 struct device *dev = wiz->dev;
504 struct clk_init_data *init;
505 const char **parent_names;
506 unsigned int num_parents;
507 struct wiz_clk_mux *mux;
508 char clk_name[100];
509 struct clk *clk;
510 int ret = 0, i;
511
512 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
513 if (!mux)
514 return -ENOMEM;
515
516 num_parents = mux_sel->num_parents;
517
> 518 parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
519 if (!parent_names)
520 return -ENOMEM;
521
522 for (i = 0; i < num_parents; i++) {
523 clk = wiz->input_clks[mux_sel->parents[i]];
524 if (IS_ERR_OR_NULL(clk)) {
525 dev_err(dev, "Failed to get parent clk for %s\n",
526 output_clk_names[clk_index]);
527 ret = -EINVAL;
528 goto err;
529 }
530 parent_names[i] = __clk_get_name(clk);
531 }
532
533 snprintf(clk_name, sizeof(clk_name), "%s_%s", dev_name(dev), output_clk_names[clk_index]);
534
535 init = &mux->clk_data;
536
537 init->ops = &wiz_clk_mux_ops;
538 init->flags = CLK_SET_RATE_NO_REPARENT;
539 init->parent_names = parent_names;
540 init->num_parents = num_parents;
541 init->name = clk_name;
542
543 mux->field = field;
544 mux->table = mux_sel->table;
545 mux->hw.init = init;
546
547 clk = devm_clk_register(dev, &mux->hw);
548 if (IS_ERR(clk)) {
549 ret = PTR_ERR(clk);
550 goto err;
551 }
552
553 wiz->output_clks[clk_index] = clk;
554
555 err:
> 556 kfree(parent_names);
557
558 return ret;
559 }
560
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27392 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-23 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23 22:06 [ti:ti-rt-linux-5.10.y 3603/3789] drivers/phy/ti/phy-j721e-wiz.c:518:17: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.