Re: [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths

From: kernel test robot

Date: Wed Mar 18 2026 - 19:49:16 EST


Hi Sheetal,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on linus/master v7.0-rc4 next-20260318]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Sheetal/dmaengine-tegra210-adma-Add-error-logging-on-failure-paths/20260318-214221
base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link: https://lore.kernel.org/r/20260318073922.1760132-1-sheetal%40nvidia.com
patch subject: [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths
config: x86_64-buildonly-randconfig-003-20260319 (https://download.01.org/0day-ci/archive/20260319/202603190726.ahyQblsp-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260319/202603190726.ahyQblsp-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/202603190726.ahyQblsp-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from include/linux/of_dma.h:14,
from drivers/dma/tegra210-adma.c:12:
drivers/dma/tegra210-adma.c: In function 'tegra_adma_set_xfer_params':
>> drivers/dma/tegra210-adma.c:677:39: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
677 | dev_err(tdc2dev(tdc), "invalid DMA periods %u (max %u)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/tegra210-adma.c:677:17: note: in expansion of macro 'dev_err'
677 | dev_err(tdc2dev(tdc), "invalid DMA periods %u (max %u)\n",
| ^~~~~~~
drivers/dma/tegra210-adma.c:677:61: note: format string is defined here
677 | dev_err(tdc2dev(tdc), "invalid DMA periods %u (max %u)\n",
| ~^
| |
| unsigned int
| %lu


vim +677 drivers/dma/tegra210-adma.c

666
667 static int tegra_adma_set_xfer_params(struct tegra_adma_chan *tdc,
668 struct tegra_adma_desc *desc,
669 dma_addr_t buf_addr,
670 enum dma_transfer_direction direction)
671 {
672 struct tegra_adma_chan_regs *ch_regs = &desc->ch_regs;
673 const struct tegra_adma_chip_data *cdata = tdc->tdma->cdata;
674 unsigned int burst_size, adma_dir, fifo_size_shift;
675
676 if (desc->num_periods > ADMA_CH_CONFIG_MAX_BUFS) {
> 677 dev_err(tdc2dev(tdc), "invalid DMA periods %u (max %u)\n",
678 desc->num_periods, ADMA_CH_CONFIG_MAX_BUFS);
679 return -EINVAL;
680 }
681
682 switch (direction) {
683 case DMA_MEM_TO_DEV:
684 fifo_size_shift = ADMA_CH_TX_FIFO_SIZE_SHIFT;
685 adma_dir = ADMA_CH_CTRL_DIR_MEM2AHUB;
686 burst_size = tdc->sconfig.dst_maxburst;
687 ch_regs->config = ADMA_CH_CONFIG_SRC_BUF(desc->num_periods - 1);
688 ch_regs->ctrl = ADMA_CH_REG_FIELD_VAL(tdc->sreq_index,
689 cdata->ch_req_mask,
690 cdata->ch_req_tx_shift);
691 ch_regs->src_addr = buf_addr;
692 break;
693
694 case DMA_DEV_TO_MEM:
695 fifo_size_shift = ADMA_CH_RX_FIFO_SIZE_SHIFT;
696 adma_dir = ADMA_CH_CTRL_DIR_AHUB2MEM;
697 burst_size = tdc->sconfig.src_maxburst;
698 ch_regs->config = ADMA_CH_CONFIG_TRG_BUF(desc->num_periods - 1);
699 ch_regs->ctrl = ADMA_CH_REG_FIELD_VAL(tdc->sreq_index,
700 cdata->ch_req_mask,
701 cdata->ch_req_rx_shift);
702 ch_regs->trg_addr = buf_addr;
703 break;
704
705 default:
706 dev_err(tdc2dev(tdc), "DMA direction is not supported\n");
707 return -EINVAL;
708 }
709
710 ch_regs->ctrl |= ADMA_CH_CTRL_DIR(adma_dir, cdata->ch_dir_mask,
711 cdata->ch_dir_shift) |
712 ADMA_CH_CTRL_MODE_CONTINUOUS(cdata->ch_mode_shift) |
713 ADMA_CH_CTRL_FLOWCTRL_EN;
714 ch_regs->config |= cdata->adma_get_burst_config(burst_size);
715
716 if (cdata->global_ch_config_base)
717 ch_regs->global_config |= cdata->ch_config;
718 else
719 ch_regs->config |= cdata->ch_config;
720
721 /*
722 * 'sreq_index' represents the current ADMAIF channel number and as per
723 * HW recommendation its FIFO size should match with the corresponding
724 * ADMA channel.
725 *
726 * ADMA FIFO size is set as per below (based on default ADMAIF channel
727 * FIFO sizes):
728 * fifo_size = 0x2 (sreq_index > sreq_index_offset)
729 * fifo_size = 0x3 (sreq_index <= sreq_index_offset)
730 *
731 */
732 if (tdc->sreq_index > cdata->sreq_index_offset)
733 ch_regs->fifo_ctrl =
734 ADMA_CH_REG_FIELD_VAL(2, cdata->ch_fifo_size_mask,
735 fifo_size_shift);
736 else
737 ch_regs->fifo_ctrl =
738 ADMA_CH_REG_FIELD_VAL(3, cdata->ch_fifo_size_mask,
739 fifo_size_shift);
740
741 ch_regs->tc = desc->period_len & ADMA_CH_TC_COUNT_MASK;
742
743 return tegra_adma_request_alloc(tdc, direction);
744 }
745

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