Re: [PATCH 2/2] remoteproc: Ingenic: Add support for new Ingenic SoCs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "周琰杰,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on v5.14-rc2 next-20210723]
[cannot apply to remoteproc/for-next rpmsg/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhou-Yanjie/Add-VPU-support-for-new-Ingenic-SoCs/20210724-171238
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 10.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
        # https://github.com/0day-ci/linux/commit/288ce023c75dca6dd232f6166be5a07d5532aad7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhou-Yanjie/Add-VPU-support-for-new-Ingenic-SoCs/20210724-171238
        git checkout 288ce023c75dca6dd232f6166be5a07d5532aad7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=sparc 

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

All warnings (new ones prefixed by >>):

   drivers/remoteproc/ingenic_rproc.c: In function 'ingenic_rproc_probe':
   drivers/remoteproc/ingenic_rproc.c:256:18: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
     256 |  vpu->mem_info = kzalloc(sizeof(struct vpu_mem_info) * vpu->soc_info->num_mems, GFP_KERNEL);
         |                  ^~~~~~~
         |                  kvzalloc
>> drivers/remoteproc/ingenic_rproc.c:256:16: warning: assignment to 'struct vpu_mem_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     256 |  vpu->mem_info = kzalloc(sizeof(struct vpu_mem_info) * vpu->soc_info->num_mems, GFP_KERNEL);
         |                ^
>> drivers/remoteproc/ingenic_rproc.c:275:12: warning: assignment to 'struct clk_bulk_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     275 |  vpu->clks = kzalloc(sizeof(struct clk_bulk_data) * vpu->soc_info->num_clks, GFP_KERNEL);
         |            ^
   cc1: some warnings being treated as errors


vim +256 drivers/remoteproc/ingenic_rproc.c

   226	
   227	static int ingenic_rproc_probe(struct platform_device *pdev)
   228	{
   229		const struct of_device_id *id = of_match_node(ingenic_rproc_of_matches, pdev->dev.of_node);
   230		struct device *dev = &pdev->dev;
   231		struct resource *mem;
   232		struct rproc *rproc;
   233		struct vpu *vpu;
   234		unsigned int i;
   235		int ret;
   236	
   237		rproc = devm_rproc_alloc(dev, "ingenic-vpu",
   238					 &ingenic_rproc_ops, NULL, sizeof(*vpu));
   239		if (!rproc)
   240			return -ENOMEM;
   241	
   242		rproc->auto_boot = auto_boot;
   243	
   244		vpu = rproc->priv;
   245		vpu->dev = &pdev->dev;
   246		vpu->soc_info = id->data;
   247		platform_set_drvdata(pdev, vpu);
   248	
   249		mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aux");
   250		vpu->aux_base = devm_ioremap_resource(dev, mem);
   251		if (IS_ERR(vpu->aux_base)) {
   252			dev_err(dev, "Failed to ioremap\n");
   253			return PTR_ERR(vpu->aux_base);
   254		}
   255	
 > 256		vpu->mem_info = kzalloc(sizeof(struct vpu_mem_info) * vpu->soc_info->num_mems, GFP_KERNEL);
   257		if (!vpu->mem_info)
   258			return -ENOMEM;
   259	
   260		for (i = 0; i < vpu->soc_info->num_mems; i++) {
   261			mem = platform_get_resource_byname(pdev, IORESOURCE_MEM,
   262							   vpu->soc_info->mem_map[i].name);
   263	
   264			vpu->mem_info[i].base = devm_ioremap_resource(dev, mem);
   265			if (IS_ERR(vpu->mem_info[i].base)) {
   266				ret = PTR_ERR(vpu->mem_info[i].base);
   267				dev_err(dev, "Failed to ioremap\n");
   268				return ret;
   269			}
   270	
   271			vpu->mem_info[i].len = resource_size(mem);
   272			vpu->mem_info[i].map = &vpu->soc_info->mem_map[i];
   273		}
   274	
 > 275		vpu->clks = kzalloc(sizeof(struct clk_bulk_data) * vpu->soc_info->num_clks, GFP_KERNEL);
   276		if (!vpu->clks)
   277			return -ENOMEM;
   278	
   279		vpu->clks[0].id = "vpu";
   280	
   281		if (vpu->soc_info->version == ID_JZ4770)
   282			vpu->clks[1].id = "aux";
   283	
   284		ret = devm_clk_bulk_get(dev, vpu->soc_info->num_clks, vpu->clks);
   285		if (ret) {
   286			dev_err(dev, "Failed to get clocks\n");
   287			return ret;
   288		}
   289	
   290		vpu->irq = platform_get_irq(pdev, 0);
   291		if (vpu->irq < 0)
   292			return vpu->irq;
   293	
   294		ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, 0, "VPU", rproc);
   295		if (ret < 0) {
   296			dev_err(dev, "Failed to request IRQ\n");
   297			return ret;
   298		}
   299	
   300		disable_irq(vpu->irq);
   301	
   302		ret = devm_rproc_add(dev, rproc);
   303		if (ret) {
   304			dev_err(dev, "Failed to register remote processor\n");
   305			return ret;
   306		}
   307	
   308		return 0;
   309	}
   310	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux