All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <202603190250.VAmYUWk2-lkp@intel.com>

diff --git a/a/1.txt b/N1/1.txt
index 26c0e09..c8e39d1 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,16 +1,6 @@
-BCC: lkp@intel.com
-CC: oe-kbuild-all@lists.linux.dev
-TO: Biju Das <biju.das.jz@bp.renesas.com>
-CC: Vinod Koul <vkoul@kernel.org>
-CC: Long Luu <long.luu.ur@renesas.com>
-CC: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
-CC: Frank Li <Frank.Li@nxp.com>
-
 tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
 head:   8e42d2514a7e8eb8d740d0ba82339dd6c0b6463f
 commit: 21323b118c16d287355e6497e1098ce1ca348bd6 [6296/7246] dmaengine: sh: rz-dmac: Add device_tx_status() callback
-:::::: branch date: 2 hours ago
-:::::: commit date: 32 hours ago
 config: m68k-randconfig-r073-20260318 (https://download.01.org/0day-ci/archive/20260319/202603190250.VAmYUWk2-lkp@intel.com/config)
 compiler: m68k-linux-gcc (GCC) 13.4.0
 smatch: v0.5.0-9004-gb810ac53
@@ -18,7 +8,7 @@ smatch: v0.5.0-9004-gb810ac53
 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>
-| Reported-by: Dan Carpenter <error27@gmail.com>
+| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
 | Closes: https://lore.kernel.org/r/202603190250.VAmYUWk2-lkp@intel.com/
 
 smatch warnings:
@@ -26,7 +16,6 @@ drivers/dma/sh/rz-dmac.c:726 rz_dmac_chan_get_residue() warn: can 'current_desc'
 
 vim +/current_desc +726 drivers/dma/sh/rz-dmac.c
 
-21323b118c16d2 Biju Das 2026-03-16  715  
 21323b118c16d2 Biju Das 2026-03-16  716  static u32 rz_dmac_chan_get_residue(struct rz_dmac_chan *channel,
 21323b118c16d2 Biju Das 2026-03-16  717  				    dma_cookie_t cookie)
 21323b118c16d2 Biju Das 2026-03-16  718  {
@@ -39,74 +28,16 @@ vim +/current_desc +726 drivers/dma/sh/rz-dmac.c
 21323b118c16d2 Biju Das 2026-03-16  725  					struct rz_dmac_desc, node);
 21323b118c16d2 Biju Das 2026-03-16 @726  	if (!current_desc)
 21323b118c16d2 Biju Das 2026-03-16  727  		return 0;
+
+Use list_first_entry_or_null() if you're not sure whether
+the list is empty.  list_first_entry() never returns NULL.
+
 21323b118c16d2 Biju Das 2026-03-16  728  
 21323b118c16d2 Biju Das 2026-03-16  729  	/*
 21323b118c16d2 Biju Das 2026-03-16  730  	 * If the cookie corresponds to a descriptor that has been completed
 21323b118c16d2 Biju Das 2026-03-16  731  	 * there is no residue. The same check has already been performed by the
 21323b118c16d2 Biju Das 2026-03-16  732  	 * caller but without holding the channel lock, so the descriptor could
 21323b118c16d2 Biju Das 2026-03-16  733  	 * now be complete.
-21323b118c16d2 Biju Das 2026-03-16  734  	 */
-21323b118c16d2 Biju Das 2026-03-16  735  	status = dma_cookie_status(&channel->vc.chan, cookie, NULL);
-21323b118c16d2 Biju Das 2026-03-16  736  	if (status == DMA_COMPLETE)
-21323b118c16d2 Biju Das 2026-03-16  737  		return 0;
-21323b118c16d2 Biju Das 2026-03-16  738  
-21323b118c16d2 Biju Das 2026-03-16  739  	/*
-21323b118c16d2 Biju Das 2026-03-16  740  	 * If the cookie doesn't correspond to the currently processing virtual
-21323b118c16d2 Biju Das 2026-03-16  741  	 * descriptor then the descriptor hasn't been processed yet, and the
-21323b118c16d2 Biju Das 2026-03-16  742  	 * residue is equal to the full descriptor size. Also, a client driver
-21323b118c16d2 Biju Das 2026-03-16  743  	 * is possible to call this function before rz_dmac_irq_handler_thread()
-21323b118c16d2 Biju Das 2026-03-16  744  	 * runs. In this case, the running descriptor will be the next
-21323b118c16d2 Biju Das 2026-03-16  745  	 * descriptor, and will appear in the done list. So, if the argument
-21323b118c16d2 Biju Das 2026-03-16  746  	 * cookie matches the done list's cookie, we can assume the residue is
-21323b118c16d2 Biju Das 2026-03-16  747  	 * zero.
-21323b118c16d2 Biju Das 2026-03-16  748  	 */
-21323b118c16d2 Biju Das 2026-03-16  749  	if (cookie != current_desc->vd.tx.cookie) {
-21323b118c16d2 Biju Das 2026-03-16  750  		list_for_each_entry(desc, &channel->ld_free, node) {
-21323b118c16d2 Biju Das 2026-03-16  751  			if (cookie == desc->vd.tx.cookie)
-21323b118c16d2 Biju Das 2026-03-16  752  				return 0;
-21323b118c16d2 Biju Das 2026-03-16  753  		}
-21323b118c16d2 Biju Das 2026-03-16  754  
-21323b118c16d2 Biju Das 2026-03-16  755  		list_for_each_entry(desc, &channel->ld_queue, node) {
-21323b118c16d2 Biju Das 2026-03-16  756  			if (cookie == desc->vd.tx.cookie)
-21323b118c16d2 Biju Das 2026-03-16  757  				return desc->len;
-21323b118c16d2 Biju Das 2026-03-16  758  		}
-21323b118c16d2 Biju Das 2026-03-16  759  
-21323b118c16d2 Biju Das 2026-03-16  760  		list_for_each_entry(desc, &channel->ld_active, node) {
-21323b118c16d2 Biju Das 2026-03-16  761  			if (cookie == desc->vd.tx.cookie)
-21323b118c16d2 Biju Das 2026-03-16  762  				return desc->len;
-21323b118c16d2 Biju Das 2026-03-16  763  		}
-21323b118c16d2 Biju Das 2026-03-16  764  
-21323b118c16d2 Biju Das 2026-03-16  765  		/*
-21323b118c16d2 Biju Das 2026-03-16  766  		 * No descriptor found for the cookie, there's thus no residue.
-21323b118c16d2 Biju Das 2026-03-16  767  		 * This shouldn't happen if the calling driver passes a correct
-21323b118c16d2 Biju Das 2026-03-16  768  		 * cookie value.
-21323b118c16d2 Biju Das 2026-03-16  769  		 */
-21323b118c16d2 Biju Das 2026-03-16  770  		WARN(1, "No descriptor for cookie!");
-21323b118c16d2 Biju Das 2026-03-16  771  		return 0;
-21323b118c16d2 Biju Das 2026-03-16  772  	}
-21323b118c16d2 Biju Das 2026-03-16  773  
-21323b118c16d2 Biju Das 2026-03-16  774  	/*
-21323b118c16d2 Biju Das 2026-03-16  775  	 * We need to read two registers. Make sure the hardware does not move
-21323b118c16d2 Biju Das 2026-03-16  776  	 * to next lmdesc while reading the current lmdesc. Trying it 3 times
-21323b118c16d2 Biju Das 2026-03-16  777  	 * should be enough: initial read, retry, retry for the paranoid.
-21323b118c16d2 Biju Das 2026-03-16  778  	 */
-21323b118c16d2 Biju Das 2026-03-16  779  	for (i = 0; i < 3; i++) {
-21323b118c16d2 Biju Das 2026-03-16  780  		crla = rz_dmac_ch_readl(channel, CRLA, 1);
-21323b118c16d2 Biju Das 2026-03-16  781  		crtb = rz_dmac_ch_readl(channel, CRTB, 1);
-21323b118c16d2 Biju Das 2026-03-16  782  		/* Still the same? */
-21323b118c16d2 Biju Das 2026-03-16  783  		if (crla == rz_dmac_ch_readl(channel, CRLA, 1))
-21323b118c16d2 Biju Das 2026-03-16  784  			break;
-21323b118c16d2 Biju Das 2026-03-16  785  	}
-21323b118c16d2 Biju Das 2026-03-16  786  
-21323b118c16d2 Biju Das 2026-03-16  787  	WARN_ONCE(i >= 3, "residue might not be continuous!");
-21323b118c16d2 Biju Das 2026-03-16  788  
-21323b118c16d2 Biju Das 2026-03-16  789  	/*
-21323b118c16d2 Biju Das 2026-03-16  790  	 * Calculate number of bytes transferred in processing virtual descriptor.
-21323b118c16d2 Biju Das 2026-03-16  791  	 * One virtual descriptor can have many lmdesc.
-21323b118c16d2 Biju Das 2026-03-16  792  	 */
-21323b118c16d2 Biju Das 2026-03-16  793  	return crtb + rz_dmac_calculate_residue_bytes_in_vd(channel, crla);
-21323b118c16d2 Biju Das 2026-03-16  794  }
-21323b118c16d2 Biju Das 2026-03-16  795  
 
 -- 
 0-DAY CI Kernel Test Service
diff --git a/a/content_digest b/N1/content_digest
index a6909fe..fcbd883 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,24 +1,19 @@
- "From\0kernel test robot <lkp@intel.com>\0"
+ "From\0Dan Carpenter <dan.carpenter@linaro.org>\0"
  "Subject\0[linux-next:master 6296/7246] drivers/dma/sh/rz-dmac.c:726 rz_dmac_chan_get_residue() warn: can 'current_desc' even be NULL?\0"
- "Date\0Thu, 19 Mar 2026 02:40:15 +0800\0"
- "To\0oe-kbuild@lists.linux.dev\0"
+ "Date\0Thu, 19 Mar 2026 11:55:15 +0300\0"
+ "To\0oe-kbuild@lists.linux.dev"
+ " Biju Das <biju.das.jz@bp.renesas.com>\0"
  "Cc\0lkp@intel.com"
- " Dan Carpenter <error27@gmail.com>\0"
+  oe-kbuild-all@lists.linux.dev
+  Vinod Koul <vkoul@kernel.org>
+  Long Luu <long.luu.ur@renesas.com>
+  Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
+ " Frank Li <Frank.Li@nxp.com>\0"
  "\00:1\0"
  "b\0"
- "BCC: lkp@intel.com\n"
- "CC: oe-kbuild-all@lists.linux.dev\n"
- "TO: Biju Das <biju.das.jz@bp.renesas.com>\n"
- "CC: Vinod Koul <vkoul@kernel.org>\n"
- "CC: Long Luu <long.luu.ur@renesas.com>\n"
- "CC: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>\n"
- "CC: Frank Li <Frank.Li@nxp.com>\n"
- "\n"
  "tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master\n"
  "head:   8e42d2514a7e8eb8d740d0ba82339dd6c0b6463f\n"
  "commit: 21323b118c16d287355e6497e1098ce1ca348bd6 [6296/7246] dmaengine: sh: rz-dmac: Add device_tx_status() callback\n"
- ":::::: branch date: 2 hours ago\n"
- ":::::: commit date: 32 hours ago\n"
  "config: m68k-randconfig-r073-20260318 (https://download.01.org/0day-ci/archive/20260319/202603190250.VAmYUWk2-lkp@intel.com/config)\n"
  "compiler: m68k-linux-gcc (GCC) 13.4.0\n"
  "smatch: v0.5.0-9004-gb810ac53\n"
@@ -26,7 +21,7 @@
  "If you fix the issue in a separate patch/commit (i.e. not just a new version of\n"
  "the same patch/commit), kindly add following tags\n"
  "| Reported-by: kernel test robot <lkp@intel.com>\n"
- "| Reported-by: Dan Carpenter <error27@gmail.com>\n"
+ "| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>\n"
  "| Closes: https://lore.kernel.org/r/202603190250.VAmYUWk2-lkp@intel.com/\n"
  "\n"
  "smatch warnings:\n"
@@ -34,7 +29,6 @@
  "\n"
  "vim +/current_desc +726 drivers/dma/sh/rz-dmac.c\n"
  "\n"
- "21323b118c16d2 Biju Das 2026-03-16  715  \n"
  "21323b118c16d2 Biju Das 2026-03-16  716  static u32 rz_dmac_chan_get_residue(struct rz_dmac_chan *channel,\n"
  "21323b118c16d2 Biju Das 2026-03-16  717  \t\t\t\t    dma_cookie_t cookie)\n"
  "21323b118c16d2 Biju Das 2026-03-16  718  {\n"
@@ -47,77 +41,19 @@
  "21323b118c16d2 Biju Das 2026-03-16  725  \t\t\t\t\tstruct rz_dmac_desc, node);\n"
  "21323b118c16d2 Biju Das 2026-03-16 @726  \tif (!current_desc)\n"
  "21323b118c16d2 Biju Das 2026-03-16  727  \t\treturn 0;\n"
+ "\n"
+ "Use list_first_entry_or_null() if you're not sure whether\n"
+ "the list is empty.  list_first_entry() never returns NULL.\n"
+ "\n"
  "21323b118c16d2 Biju Das 2026-03-16  728  \n"
  "21323b118c16d2 Biju Das 2026-03-16  729  \t/*\n"
  "21323b118c16d2 Biju Das 2026-03-16  730  \t * If the cookie corresponds to a descriptor that has been completed\n"
  "21323b118c16d2 Biju Das 2026-03-16  731  \t * there is no residue. The same check has already been performed by the\n"
  "21323b118c16d2 Biju Das 2026-03-16  732  \t * caller but without holding the channel lock, so the descriptor could\n"
  "21323b118c16d2 Biju Das 2026-03-16  733  \t * now be complete.\n"
- "21323b118c16d2 Biju Das 2026-03-16  734  \t */\n"
- "21323b118c16d2 Biju Das 2026-03-16  735  \tstatus = dma_cookie_status(&channel->vc.chan, cookie, NULL);\n"
- "21323b118c16d2 Biju Das 2026-03-16  736  \tif (status == DMA_COMPLETE)\n"
- "21323b118c16d2 Biju Das 2026-03-16  737  \t\treturn 0;\n"
- "21323b118c16d2 Biju Das 2026-03-16  738  \n"
- "21323b118c16d2 Biju Das 2026-03-16  739  \t/*\n"
- "21323b118c16d2 Biju Das 2026-03-16  740  \t * If the cookie doesn't correspond to the currently processing virtual\n"
- "21323b118c16d2 Biju Das 2026-03-16  741  \t * descriptor then the descriptor hasn't been processed yet, and the\n"
- "21323b118c16d2 Biju Das 2026-03-16  742  \t * residue is equal to the full descriptor size. Also, a client driver\n"
- "21323b118c16d2 Biju Das 2026-03-16  743  \t * is possible to call this function before rz_dmac_irq_handler_thread()\n"
- "21323b118c16d2 Biju Das 2026-03-16  744  \t * runs. In this case, the running descriptor will be the next\n"
- "21323b118c16d2 Biju Das 2026-03-16  745  \t * descriptor, and will appear in the done list. So, if the argument\n"
- "21323b118c16d2 Biju Das 2026-03-16  746  \t * cookie matches the done list's cookie, we can assume the residue is\n"
- "21323b118c16d2 Biju Das 2026-03-16  747  \t * zero.\n"
- "21323b118c16d2 Biju Das 2026-03-16  748  \t */\n"
- "21323b118c16d2 Biju Das 2026-03-16  749  \tif (cookie != current_desc->vd.tx.cookie) {\n"
- "21323b118c16d2 Biju Das 2026-03-16  750  \t\tlist_for_each_entry(desc, &channel->ld_free, node) {\n"
- "21323b118c16d2 Biju Das 2026-03-16  751  \t\t\tif (cookie == desc->vd.tx.cookie)\n"
- "21323b118c16d2 Biju Das 2026-03-16  752  \t\t\t\treturn 0;\n"
- "21323b118c16d2 Biju Das 2026-03-16  753  \t\t}\n"
- "21323b118c16d2 Biju Das 2026-03-16  754  \n"
- "21323b118c16d2 Biju Das 2026-03-16  755  \t\tlist_for_each_entry(desc, &channel->ld_queue, node) {\n"
- "21323b118c16d2 Biju Das 2026-03-16  756  \t\t\tif (cookie == desc->vd.tx.cookie)\n"
- "21323b118c16d2 Biju Das 2026-03-16  757  \t\t\t\treturn desc->len;\n"
- "21323b118c16d2 Biju Das 2026-03-16  758  \t\t}\n"
- "21323b118c16d2 Biju Das 2026-03-16  759  \n"
- "21323b118c16d2 Biju Das 2026-03-16  760  \t\tlist_for_each_entry(desc, &channel->ld_active, node) {\n"
- "21323b118c16d2 Biju Das 2026-03-16  761  \t\t\tif (cookie == desc->vd.tx.cookie)\n"
- "21323b118c16d2 Biju Das 2026-03-16  762  \t\t\t\treturn desc->len;\n"
- "21323b118c16d2 Biju Das 2026-03-16  763  \t\t}\n"
- "21323b118c16d2 Biju Das 2026-03-16  764  \n"
- "21323b118c16d2 Biju Das 2026-03-16  765  \t\t/*\n"
- "21323b118c16d2 Biju Das 2026-03-16  766  \t\t * No descriptor found for the cookie, there's thus no residue.\n"
- "21323b118c16d2 Biju Das 2026-03-16  767  \t\t * This shouldn't happen if the calling driver passes a correct\n"
- "21323b118c16d2 Biju Das 2026-03-16  768  \t\t * cookie value.\n"
- "21323b118c16d2 Biju Das 2026-03-16  769  \t\t */\n"
- "21323b118c16d2 Biju Das 2026-03-16  770  \t\tWARN(1, \"No descriptor for cookie!\");\n"
- "21323b118c16d2 Biju Das 2026-03-16  771  \t\treturn 0;\n"
- "21323b118c16d2 Biju Das 2026-03-16  772  \t}\n"
- "21323b118c16d2 Biju Das 2026-03-16  773  \n"
- "21323b118c16d2 Biju Das 2026-03-16  774  \t/*\n"
- "21323b118c16d2 Biju Das 2026-03-16  775  \t * We need to read two registers. Make sure the hardware does not move\n"
- "21323b118c16d2 Biju Das 2026-03-16  776  \t * to next lmdesc while reading the current lmdesc. Trying it 3 times\n"
- "21323b118c16d2 Biju Das 2026-03-16  777  \t * should be enough: initial read, retry, retry for the paranoid.\n"
- "21323b118c16d2 Biju Das 2026-03-16  778  \t */\n"
- "21323b118c16d2 Biju Das 2026-03-16  779  \tfor (i = 0; i < 3; i++) {\n"
- "21323b118c16d2 Biju Das 2026-03-16  780  \t\tcrla = rz_dmac_ch_readl(channel, CRLA, 1);\n"
- "21323b118c16d2 Biju Das 2026-03-16  781  \t\tcrtb = rz_dmac_ch_readl(channel, CRTB, 1);\n"
- "21323b118c16d2 Biju Das 2026-03-16  782  \t\t/* Still the same? */\n"
- "21323b118c16d2 Biju Das 2026-03-16  783  \t\tif (crla == rz_dmac_ch_readl(channel, CRLA, 1))\n"
- "21323b118c16d2 Biju Das 2026-03-16  784  \t\t\tbreak;\n"
- "21323b118c16d2 Biju Das 2026-03-16  785  \t}\n"
- "21323b118c16d2 Biju Das 2026-03-16  786  \n"
- "21323b118c16d2 Biju Das 2026-03-16  787  \tWARN_ONCE(i >= 3, \"residue might not be continuous!\");\n"
- "21323b118c16d2 Biju Das 2026-03-16  788  \n"
- "21323b118c16d2 Biju Das 2026-03-16  789  \t/*\n"
- "21323b118c16d2 Biju Das 2026-03-16  790  \t * Calculate number of bytes transferred in processing virtual descriptor.\n"
- "21323b118c16d2 Biju Das 2026-03-16  791  \t * One virtual descriptor can have many lmdesc.\n"
- "21323b118c16d2 Biju Das 2026-03-16  792  \t */\n"
- "21323b118c16d2 Biju Das 2026-03-16  793  \treturn crtb + rz_dmac_calculate_residue_bytes_in_vd(channel, crla);\n"
- "21323b118c16d2 Biju Das 2026-03-16  794  }\n"
- "21323b118c16d2 Biju Das 2026-03-16  795  \n"
  "\n"
  "-- \n"
  "0-DAY CI Kernel Test Service\n"
  https://github.com/intel/lkp-tests/wiki
 
-f72c533f99f53a56b4201e94363db86c51b2f81eb1eaff750114899d3a1aca0c
+691461cd6c40e673c3069aa7e040a3b23922276ad1f3dce0c3ad4922524bdb52

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.