[linux-next:master 9903/10945] drivers/dma/loongson1-dma.c:434:28: error: no member named 'slave_map' in 'struct plat_ls1x_dma'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5e63226c72287bc6c6724d4fc7e157af0e3d7908
commit: ad0fe14e164970fe9c2ab03b7a6ce452435239c6 [9903/10945] dmaengine: Loongson1: Add Loongson1 dmaengine driver
config: mips-randconfig-r025-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1076082a0d97bd5c16a25ee7cf3dbb6ee4b5a9fe)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ad0fe14e164970fe9c2ab03b7a6ce452435239c6
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout ad0fe14e164970fe9c2ab03b7a6ce452435239c6
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

   drivers/dma/loongson1-dma.c:359:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                   return ret;
                          ^~~
   drivers/dma/loongson1-dma.c:354:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
>> drivers/dma/loongson1-dma.c:434:28: error: no member named 'slave_map' in 'struct plat_ls1x_dma'
           ddev->filter.map = pdata->slave_map;
                              ~~~~~  ^
>> drivers/dma/loongson1-dma.c:435:31: error: no member named 'slavecnt' in 'struct plat_ls1x_dma'
           ddev->filter.mapcnt = pdata->slavecnt;
                                 ~~~~~  ^
   1 warning and 2 errors generated.


vim +434 drivers/dma/loongson1-dma.c

   392	
   393	static int ls1x_dma_probe(struct platform_device *pdev)
   394	{
   395		struct device *dev = &pdev->dev;
   396		struct plat_ls1x_dma *pdata;
   397		struct dma_device *ddev;
   398		struct ls1x_dma *dma;
   399		int nr_chans, ret, i;
   400	
   401		pdata = dev_get_platdata(dev);
   402		if (!pdata) {
   403			dev_err(dev, "platform data missing!\n");
   404			return -EINVAL;
   405		}
   406	
   407		nr_chans = platform_irq_count(pdev);
   408		if (nr_chans <= 0)
   409			return nr_chans;
   410	
   411		dma = devm_kzalloc(dev, struct_size(dma, chan, nr_chans), GFP_KERNEL);
   412		if (!dma)
   413			return -ENOMEM;
   414	
   415		/* initialize DMA device */
   416		dma->reg_base = devm_platform_ioremap_resource(pdev, 0);
   417		if (IS_ERR(dma->reg_base))
   418			return PTR_ERR(dma->reg_base);
   419	
   420		ddev = &dma->ddev;
   421		ddev->dev = dev;
   422		ddev->copy_align = DMAENGINE_ALIGN_16_BYTES;
   423		ddev->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
   424		ddev->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
   425		ddev->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
   426		ddev->residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
   427		ddev->device_alloc_chan_resources = ls1x_dma_alloc_chan_resources;
   428		ddev->device_free_chan_resources = ls1x_dma_free_chan_resources;
   429		ddev->device_prep_slave_sg = ls1x_dma_prep_slave_sg;
   430		ddev->device_config = ls1x_dma_slave_config;
   431		ddev->device_terminate_all = ls1x_dma_terminate_all;
   432		ddev->device_tx_status = dma_cookie_status;
   433		ddev->device_issue_pending = ls1x_dma_issue_pending;
 > 434		ddev->filter.map = pdata->slave_map;
 > 435		ddev->filter.mapcnt = pdata->slavecnt;
   436		ddev->filter.fn = ls1x_dma_filter;
   437	
   438		dma_cap_set(DMA_SLAVE, ddev->cap_mask);
   439		INIT_LIST_HEAD(&ddev->channels);
   440	
   441		/* initialize DMA channels */
   442		for (i = 0; i < nr_chans; i++) {
   443			ret = ls1x_dma_chan_probe(pdev, dma, i);
   444			if (ret)
   445				return ret;
   446		}
   447		dma->nr_chans = nr_chans;
   448	
   449		dma->clk = devm_clk_get(dev, pdev->name);
   450		if (IS_ERR(dma->clk)) {
   451			dev_err(dev, "failed to get %s clock!\n", pdev->name);
   452			return PTR_ERR(dma->clk);
   453		}
   454		clk_prepare_enable(dma->clk);
   455	
   456		ret = dma_async_device_register(ddev);
   457		if (ret) {
   458			dev_err(dev, "failed to register DMA device! %d\n", ret);
   459			clk_disable_unprepare(dma->clk);
   460			return ret;
   461		}
   462	
   463		platform_set_drvdata(pdev, dma);
   464		dev_info(dev, "Loongson1 DMA driver registered\n");
   465	
   466		return 0;
   467	}
   468	

---
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]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux