linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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
@ 2021-07-07  1:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-07  1:06 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: kbuild-all, linux-kernel, Vignesh Raghavendra

[-- Attachment #1: Type: text/plain, Size: 3938 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22732 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-07  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  1:06 [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 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).