public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luis Chamberlain <mcgrof@kernel.org>,
	vkoul@kernel.org, chenxiang66@hisilicon.com,
	m.szyprowski@samsung.com, robin.murphy@arm.com, leon@kernel.org,
	jgg@nvidia.com, alex.williamson@redhat.com,
	joel.granados@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, iommu@lists.linux.dev,
	dmaengine@vger.kernel.org, linux-block@vger.kernel.org,
	gost.dev@samsung.com, mcgrof@kernel.org
Subject: Re: [PATCH 3/6] dmatest: move printing to its own routine
Date: Thu, 22 May 2025 06:26:33 +0800	[thread overview]
Message-ID: <202505220605.kiB8N7DJ-lkp@intel.com> (raw)
In-Reply-To: <20250520223913.3407136-4-mcgrof@kernel.org>

Hi Luis,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.15-rc7 next-20250521]
[cannot apply to vkoul-dmaengine/next shuah-kselftest/next shuah-kselftest/fixes sysctl/sysctl-next]
[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/Luis-Chamberlain/fake-dma-add-fake-dma-engine-driver/20250521-064035
base:   linus/master
patch link:    https://lore.kernel.org/r/20250520223913.3407136-4-mcgrof%40kernel.org
patch subject: [PATCH 3/6] dmatest: move printing to its own routine
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20250522/202505220605.kiB8N7DJ-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250522/202505220605.kiB8N7DJ-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/202505220605.kiB8N7DJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/dma/dmatest.c: In function 'dmatest_func':
>> drivers/dma/dmatest.c:957:17: warning: variable 'start_time' set but not used [-Wunused-but-set-variable]
     957 |         ktime_t start_time, streaming_start;
         |                 ^~~~~~~~~~


vim +/start_time +957 drivers/dma/dmatest.c

   932	
   933	/*
   934	 * This function repeatedly tests DMA transfers of various lengths and
   935	 * offsets for a given operation type until it is told to exit by
   936	 * kthread_stop(). There may be multiple threads running this function
   937	 * in parallel for a single channel, and there may be multiple channels
   938	 * being tested in parallel.
   939	 *
   940	 * Before each test, the source and destination buffer is initialized
   941	 * with a known pattern. This pattern is different depending on
   942	 * whether it's in an area which is supposed to be copied or
   943	 * overwritten, and different in the source and destination buffers.
   944	 * So if the DMA engine doesn't copy exactly what we tell it to copy,
   945	 * we'll notice.
   946	 */
   947	static int dmatest_func(void *data)
   948	{
   949		struct dmatest_thread *thread = data;
   950		struct dmatest_info *info = thread->info;
   951		struct dmatest_params *params = &info->params;
   952		struct dma_chan *chan = thread->chan;
   953		unsigned int buf_size;
   954		u8 align;
   955		bool is_memset;
   956		unsigned int total_iterations = 0;
 > 957		ktime_t start_time, streaming_start;
   958		ktime_t filltime = 0;
   959		ktime_t comparetime = 0;
   960		int ret;
   961	
   962		set_freezable();
   963		smp_rmb();
   964		thread->pending = false;
   965	
   966		/* Initialize statistics */
   967		thread->streaming_tests = 0;
   968		thread->streaming_failures = 0;
   969		thread->streaming_total_len = 0;
   970		thread->streaming_runtime = 0;
   971	
   972		/* Setup test parameters and allocate buffers */
   973		ret = dmatest_setup_test(thread, &buf_size, &align, &is_memset);
   974		if (ret)
   975			goto err_thread_type;
   976	
   977		set_user_nice(current, 10);
   978	
   979		start_time = ktime_get();
   980		while (!(kthread_should_stop() ||
   981			(params->iterations && total_iterations >= params->iterations))) {
   982	
   983			/* Test streaming DMA path */
   984			streaming_start = ktime_get();
   985			ret = dmatest_do_dma_test(thread, buf_size, align, is_memset,
   986						  &thread->streaming_tests, &thread->streaming_failures,
   987						  &thread->streaming_total_len,
   988						  &filltime, &comparetime);
   989			thread->streaming_runtime = ktime_add(thread->streaming_runtime,
   990							    ktime_sub(ktime_get(), streaming_start));
   991			if (ret < 0)
   992				break;
   993	
   994			total_iterations++;
   995		}
   996	
   997		/* Subtract fill and compare time from both paths */
   998		thread->streaming_runtime = ktime_sub(thread->streaming_runtime,
   999						   ktime_divns(filltime, 2));
  1000		thread->streaming_runtime = ktime_sub(thread->streaming_runtime,
  1001						   ktime_divns(comparetime, 2));
  1002	
  1003		ret = 0;
  1004		dmatest_cleanup_test(thread);
  1005	
  1006	err_thread_type:
  1007		/* Print detailed statistics */
  1008		dmatest_print_detailed_stats(thread);
  1009	
  1010		/* terminate all transfers on specified channels */
  1011		if (ret || (thread->streaming_failures))
  1012			dmaengine_terminate_sync(chan);
  1013	
  1014		thread->done = true;
  1015		wake_up(&thread_wait);
  1016	
  1017		return ret;
  1018	}
  1019	

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

  parent reply	other threads:[~2025-05-21 22:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 22:39 [PATCH 0/6] dma: fake-dma and IOVA tests Luis Chamberlain
2025-05-20 22:39 ` [PATCH 1/6] fake-dma: add fake dma engine driver Luis Chamberlain
2025-05-21 14:20   ` Robin Murphy
2025-05-21 17:07     ` Luis Chamberlain
2025-05-22 11:18       ` Marek Szyprowski
2025-05-22 16:59         ` Luis Chamberlain
2025-05-22 19:38           ` Luis Chamberlain
2025-05-21 23:40   ` kernel test robot
2025-05-20 22:39 ` [PATCH 2/6] dmatest: split dmatest_func() into helpers Luis Chamberlain
2025-05-20 22:39 ` [PATCH 3/6] dmatest: move printing to its own routine Luis Chamberlain
2025-05-21 14:41   ` Robin Murphy
2025-05-21 17:10     ` Luis Chamberlain
2025-05-21 22:26   ` kernel test robot [this message]
2025-05-20 22:39 ` [PATCH 4/6] dmatest: add IOVA tests Luis Chamberlain
2025-05-20 22:39 ` [PATCH 5/6] dma-mapping: benchmark: move validation parameters into a helper Luis Chamberlain
2025-05-20 22:39 ` [PATCH 6/6] dma-mapping: benchmark: add IOVA support Luis Chamberlain
2025-05-21 11:58   ` kernel test robot
2025-05-21 16:08   ` Robin Murphy
2025-05-21 17:17     ` Luis Chamberlain
2025-05-21 11:17 ` [PATCH 0/6] dma: fake-dma and IOVA tests Leon Romanovsky

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=202505220605.kiB8N7DJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gost.dev@samsung.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joel.granados@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mcgrof@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --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