* [ti:ti-linux-5.10.y 17348/20446] drivers/phy/ti/phy-j721e-wiz.c:731:18: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast
@ 2023-01-24 7:59 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-24 7:59 UTC (permalink / raw)
To: Matt Ranostay; +Cc: oe-kbuild-all, vigneshr, nm
Hi Matt,
FYI, the error/warning still remains.
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.10.y
head: 90976f615b7ec6d31eba0db18c5b6844a3371e10
commit: 00c06b1206b933de1d62b89db8b6846dc885eb5f [17348/20446] phy: ti: phy-j721e-wiz: stop name conflict if multiple serdes are initialized
config: h8300-buildonly-randconfig-r001-20230123 (https://download.01.org/0day-ci/archive/20230124/202301241512.d5c19xDp-lkp@intel.com/config)
compiler: h8300-linux-gcc (GCC) 12.1.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-linux-5.10.y
git checkout 00c06b1206b933de1d62b89db8b6846dc885eb5f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=h8300 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/phy/ti/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/phy/ti/phy-j721e-wiz.c: In function 'wiz_phy_en_refclk_register':
drivers/phy/ti/phy-j721e-wiz.c:731:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
731 | clk_name = kzalloc(sz, GFP_KERNEL);
| ^~~~~~~
| vzalloc
>> drivers/phy/ti/phy-j721e-wiz.c:731:18: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
731 | clk_name = kzalloc(sz, GFP_KERNEL);
| ^
drivers/phy/ti/phy-j721e-wiz.c:743:9: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
743 | kfree(clk_name);
| ^~~~~
| vfree
drivers/phy/ti/phy-j721e-wiz.c: In function 'wiz_mux_clk_register':
drivers/phy/ti/phy-j721e-wiz.c:796:22: warning: assignment to 'const char **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
796 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
| ^
cc1: some warnings being treated as errors
vim +731 drivers/phy/ti/phy-j721e-wiz.c
710
711 static int wiz_phy_en_refclk_register(struct wiz *wiz)
712 {
713 struct wiz_phy_en_refclk *wiz_phy_en_refclk;
714 struct device *dev = wiz->dev;
715 struct clk_init_data *init;
716 struct clk *clk;
717 char *clk_name;
718 unsigned int sz;
719
720 wiz_phy_en_refclk = devm_kzalloc(dev, sizeof(*wiz_phy_en_refclk), GFP_KERNEL);
721 if (!wiz_phy_en_refclk)
722 return -ENOMEM;
723
724 init = &wiz_phy_en_refclk->clk_data;
725
726 init->ops = &wiz_phy_en_refclk_ops;
727 init->flags = 0;
728
729 sz = strlen(dev_name(dev)) + strlen(output_clk_names[TI_WIZ_PHY_EN_REFCLK]) + 2;
730
> 731 clk_name = kzalloc(sz, GFP_KERNEL);
732 if (!clk_name)
733 return -ENOMEM;
734
735 snprintf(clk_name, sz, "%s_%s", dev_name(dev), output_clk_names[TI_WIZ_PHY_EN_REFCLK]);
736 init->name = clk_name;
737
738 wiz_phy_en_refclk->phy_en_refclk = wiz->phy_en_refclk;
739 wiz_phy_en_refclk->hw.init = init;
740
741 clk = devm_clk_register(dev, &wiz_phy_en_refclk->hw);
742
743 kfree(clk_name);
744
745 if (IS_ERR(clk))
746 return PTR_ERR(clk);
747
748 wiz->output_clks[TI_WIZ_PHY_EN_REFCLK] = clk;
749
750 return 0;
751 }
752
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-24 8:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24 7:59 [ti:ti-linux-5.10.y 17348/20446] drivers/phy/ti/phy-j721e-wiz.c:731:18: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast 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.