lkml.org 
[lkml]   [2021]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[ti:ti-rt-linux-5.10.y 4371/6639] drivers/phy/ti/phy-j721e-wiz.c:518:15: warning: assignment to 'const char **' from 'int' makes pointer from integer without a cast
Hi Kishon,

FYI, the error/warning still remains.

tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 7c1cd0160fe1c5b196ee67e3f3f7df2f6a05997f
commit: 7e470927fb259535419c0b074f58c34890f26e5f [4371/6639] phy: ti: j721e-wiz: Model the internal clocks without device tree input
config: arc-randconfig-r025-20210706 (attached as .config)
compiler: arc-elf-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 ARCH=arc

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

All 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@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-07-07 03:07    [W:0.028 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site