[linux-next:master 11259/12481] drivers/dma/ep93xx_dma.c:1354:37: sparse: sparse: incorrect type in return expression (different address spaces)

[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:   62f92d634458a1e308bb699986b9147a6d670457
commit: 2e7f55ce430240a5547b8a94b4c532fc8c20b18b [11259/12481] dmaengine: cirrus: Convert to DT for Cirrus EP93xx
config: parisc-randconfig-r123-20240920 (https://download.01.org/0day-ci/archive/20240920/202409202250.fPlN2Erd-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240920/202409202250.fPlN2Erd-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409202250.fPlN2Erd-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/dma/ep93xx_dma.c:1354:37: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected struct ep93xx_dma_engine * @@     got void [noderef] __iomem *regs @@
   drivers/dma/ep93xx_dma.c:1354:37: sparse:     expected struct ep93xx_dma_engine *
   drivers/dma/ep93xx_dma.c:1354:37: sparse:     got void [noderef] __iomem *regs

vim +1354 drivers/dma/ep93xx_dma.c

  1324	
  1325	static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pdev)
  1326	{
  1327		const struct ep93xx_edma_data *data;
  1328		struct device *dev = &pdev->dev;
  1329		struct ep93xx_dma_engine *edma;
  1330		struct dma_device *dma_dev;
  1331		char dma_clk_name[5];
  1332		int i;
  1333	
  1334		data = device_get_match_data(dev);
  1335		if (!data)
  1336			return ERR_PTR(dev_err_probe(dev, -ENODEV, "No device match found\n"));
  1337	
  1338		edma = devm_kzalloc(dev, struct_size(edma, channels, data->num_channels),
  1339				    GFP_KERNEL);
  1340		if (!edma)
  1341			return ERR_PTR(-ENOMEM);
  1342	
  1343		edma->m2m = data->id;
  1344		edma->num_channels = data->num_channels;
  1345		dma_dev = &edma->dma_dev;
  1346	
  1347		INIT_LIST_HEAD(&dma_dev->channels);
  1348		for (i = 0; i < edma->num_channels; i++) {
  1349			struct ep93xx_dma_chan *edmac = &edma->channels[i];
  1350	
  1351			edmac->chan.device = dma_dev;
  1352			edmac->regs = devm_platform_ioremap_resource(pdev, i);
  1353			if (IS_ERR(edmac->regs))
> 1354				return edmac->regs;
  1355	
  1356			edmac->irq = fwnode_irq_get(dev_fwnode(dev), i);
  1357			if (edmac->irq < 0)
  1358				return ERR_PTR(edmac->irq);
  1359	
  1360			edmac->edma = edma;
  1361	
  1362			if (edma->m2m)
  1363				sprintf(dma_clk_name, "m2m%u", i);
  1364			else
  1365				sprintf(dma_clk_name, "m2p%u", i);
  1366	
  1367			edmac->clk = devm_clk_get(dev, dma_clk_name);
  1368			if (IS_ERR(edmac->clk)) {
  1369				dev_err_probe(dev, PTR_ERR(edmac->clk),
  1370					      "no %s clock found\n", dma_clk_name);
  1371				return ERR_CAST(edmac->clk);
  1372			}
  1373	
  1374			spin_lock_init(&edmac->lock);
  1375			INIT_LIST_HEAD(&edmac->active);
  1376			INIT_LIST_HEAD(&edmac->queue);
  1377			INIT_LIST_HEAD(&edmac->free_list);
  1378			tasklet_setup(&edmac->tasklet, ep93xx_dma_tasklet);
  1379	
  1380			list_add_tail(&edmac->chan.device_node,
  1381				      &dma_dev->channels);
  1382		}
  1383	
  1384		return edma;
  1385	}
  1386	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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