public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sheetal <sheetal@nvidia.com>, Jon Hunter <jonathanh@nvidia.com>,
	Vinod Koul <vkoul@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Frank Li <Frank.Li@kernel.org>, Mohan Kumar <mkumard@nvidia.com>,
	dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, Sheetal <sheetal@nvidia.com>
Subject: Re: [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths
Date: Thu, 19 Mar 2026 07:42:09 +0800	[thread overview]
Message-ID: <202603190726.ahyQblsp-lkp@intel.com> (raw)
In-Reply-To: <20260318073922.1760132-1-sheetal@nvidia.com>

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@intel.com/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@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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603190726.ahyQblsp-lkp@intel.com/

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

  parent reply	other threads:[~2026-03-18 23:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18  7:39 [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths Sheetal
2026-03-18  9:45 ` Vinod Koul
2026-03-18 23:42 ` kernel test robot [this message]
2026-03-18 23:42 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202603190726.ahyQblsp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mkumard@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sheetal@nvidia.com \
    --cc=thierry.reding@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox