[PATCH 2/2] counter: microchip-tcb-capture: Add DMA support for TC_RAB register reads

kernel test robot lkp at intel.com
Thu May 29 02:21:59 PDT 2025


Hi Dharma,

kernel test robot noticed the following build warnings:

[auto build test WARNING on fefff2755f2aa4125dce2a1edfe7e545c7c621f2]

url:    https://github.com/intel-lab-lkp/linux/commits/Dharma-Balasubiramani/counter-microchip-tcb-capture-Retrieve-and-map-parent-base-address/20250528-141627
base:   fefff2755f2aa4125dce2a1edfe7e545c7c621f2
patch link:    https://lore.kernel.org/r/20250528-mchp-tcb-dma-v1-2-083a41fb7b51%40microchip.com
patch subject: [PATCH 2/2] counter: microchip-tcb-capture: Add DMA support for TC_RAB register reads
config: arm-randconfig-r121-20250529 (https://download.01.org/0day-ci/archive/20250529/202505291723.WYIWqmvP-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.3.0
reproduce: (https://download.01.org/0day-ci/archive/20250529/202505291723.WYIWqmvP-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505291723.WYIWqmvP-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/counter/microchip-tcb-capture.c:140:16: sparse: sparse: cast to restricted __le32

vim +140 drivers/counter/microchip-tcb-capture.c

   101	
   102	static int mchp_tc_dma_transfer(struct mchp_tc_data *priv, u32 *val)
   103	{
   104		struct dma_async_tx_descriptor *desc;
   105		struct device *dev = &priv->pdev->dev;
   106		dma_cookie_t cookie;
   107		int ret;
   108	
   109		ret = dmaengine_slave_config(priv->dma.chan, &priv->dma.slave_cfg);
   110		if (ret) {
   111			dev_err(dev, "DMA slave_config failed (%d)\n", ret);
   112			return ret;
   113		}
   114	
   115		desc = dmaengine_prep_dma_memcpy(priv->dma.chan,
   116						 priv->dma.addr,
   117						 priv->dma.slave_cfg.src_addr,
   118						 sizeof(u32),
   119						 DMA_CTRL_ACK | DMA_PREP_INTERRUPT);
   120		if (!desc) {
   121			dev_err(dev, "DMA prep descriptor failed\n");
   122			return -ENOMEM;
   123		}
   124	
   125		cookie = dmaengine_submit(desc);
   126		if (dma_submit_error(cookie)) {
   127			dev_err(dev, "DMA submit error (%d)\n", cookie);
   128			return cookie ?: -EIO;
   129		}
   130	
   131		dma_async_issue_pending(priv->dma.chan);
   132	
   133		ret = dma_sync_wait(priv->dma.chan, cookie);
   134		if (ret) {
   135			dev_err(dev, "DMA transfer timed out (%d)\n", ret);
   136			return ret;
   137		}
   138	
   139		/* Retrieve the 32-bit value the engine just copied */
 > 140		*val = le32_to_cpu(*(u32 *)priv->dma.buf);
   141	
   142		return 0;
   143	}
   144	

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



More information about the linux-arm-kernel mailing list