linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org
Subject: [rafael-pm:bleeding-edge 32/75] drivers/dma/sh/shdma-base.c:146:9: error: assigning to 'int' from incompatible type 'void'
Date: Wed, 17 Dec 2025 23:16:20 +0800	[thread overview]
Message-ID: <202512172351.Q3FbZRLS-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   3c2d6399cecba91a426987e4fba035b21682335f
commit: f2729bf572500e3f9d4d5140129c72bd18942a17 [32/75] PM: runtime: Change pm_runtime_put() return type to void
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20251217/202512172351.Q3FbZRLS-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251217/202512172351.Q3FbZRLS-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/202512172351.Q3FbZRLS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/dma/sh/shdma-base.c:146:9: error: assigning to 'int' from incompatible type 'void'
     146 |                                 ret = pm_runtime_put(schan->dev);
         |                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.
--
>> sound/soc/rockchip/rockchip_sai.c:1491:2: error: statement requires expression of scalar type ('void' invalid)
    1491 |         if (pm_runtime_put(&pdev->dev))
         |         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.
--
>> drivers/watchdog/rzv2h_wdt.c:271:6: error: assigning to 'int' from incompatible type 'void'
     271 |         ret = pm_runtime_put(&pdev->dev);
         |             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +146 drivers/dma/sh/shdma-base.c

9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   69  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   70  static dma_cookie_t shdma_tx_submit(struct dma_async_tx_descriptor *tx)
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   71  {
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   72  	struct shdma_desc *chunk, *c, *desc =
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02   73  		container_of(tx, struct shdma_desc, async_tx);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   74  	struct shdma_chan *schan = to_shdma_chan(tx->chan);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   75  	dma_async_tx_callback callback = tx->callback;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   76  	dma_cookie_t cookie;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   77  	bool power_up;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   78  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   79  	spin_lock_irq(&schan->chan_lock);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   80  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   81  	power_up = list_empty(&schan->ld_queue);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   82  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   83  	cookie = dma_cookie_assign(tx);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   84  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   85  	/* Mark all chunks of this descriptor as submitted, move to the queue */
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   86  	list_for_each_entry_safe(chunk, c, desc->node.prev, node) {
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   87  		/*
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   88  		 * All chunks are on the global ld_free, so, we have to find
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   89  		 * the end of the chain ourselves
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   90  		 */
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   91  		if (chunk != desc && (chunk->mark == DESC_IDLE ||
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   92  				      chunk->async_tx.cookie > 0 ||
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   93  				      chunk->async_tx.cookie == -EBUSY ||
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   94  				      &chunk->node == &schan->ld_free))
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   95  			break;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09   96  		chunk->mark = DESC_SUBMITTED;
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02   97  		if (chunk->chunks == 1) {
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02   98  			chunk->async_tx.callback = callback;
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02   99  			chunk->async_tx.callback_param = tx->callback_param;
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02  100  		} else {
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  101  			/* Callback goes to the last chunk */
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  102  			chunk->async_tx.callback = NULL;
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02  103  		}
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  104  		chunk->cookie = cookie;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  105  		list_move_tail(&chunk->node, &schan->ld_queue);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  106  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  107  		dev_dbg(schan->dev, "submit #%d@%p on %d\n",
91ea74e9ec5c58 Kuninori Morimoto     2014-04-02  108  			tx->cookie, &chunk->async_tx, schan->id);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  109  	}
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  110  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  111  	if (power_up) {
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  112  		int ret;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  113  		schan->pm_state = SHDMA_PM_BUSY;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  114  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  115  		ret = pm_runtime_get(schan->dev);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  116  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  117  		spin_unlock_irq(&schan->chan_lock);
d143f939a95696 Vinod Koul            2022-03-10  118  		if (ret < 0)
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  119  			dev_err(schan->dev, "%s(): GET = %d\n", __func__, ret);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  120  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  121  		pm_runtime_barrier(schan->dev);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  122  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  123  		spin_lock_irq(&schan->chan_lock);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  124  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  125  		/* Have we been reset, while waiting? */
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  126  		if (schan->pm_state != SHDMA_PM_ESTABLISHED) {
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  127  			struct shdma_dev *sdev =
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  128  				to_shdma_dev(schan->dma_chan.device);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  129  			const struct shdma_ops *ops = sdev->ops;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  130  			dev_dbg(schan->dev, "Bring up channel %d\n",
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  131  				schan->id);
d9a3e992945278 Thomas Andreatta      2025-08-27  132  
d9a3e992945278 Thomas Andreatta      2025-08-27  133  			ret = ops->setup_xfer(schan, schan->slave_id);
d9a3e992945278 Thomas Andreatta      2025-08-27  134  			if (ret < 0) {
d9a3e992945278 Thomas Andreatta      2025-08-27  135  				dev_err(schan->dev, "setup_xfer failed: %d\n", ret);
d9a3e992945278 Thomas Andreatta      2025-08-27  136  
d9a3e992945278 Thomas Andreatta      2025-08-27  137  				/* Remove chunks from the queue and mark them as idle */
d9a3e992945278 Thomas Andreatta      2025-08-27  138  				list_for_each_entry_safe(chunk, c, &schan->ld_queue, node) {
d9a3e992945278 Thomas Andreatta      2025-08-27  139  					if (chunk->cookie == cookie) {
d9a3e992945278 Thomas Andreatta      2025-08-27  140  						chunk->mark = DESC_IDLE;
d9a3e992945278 Thomas Andreatta      2025-08-27  141  						list_move(&chunk->node, &schan->ld_free);
d9a3e992945278 Thomas Andreatta      2025-08-27  142  					}
d9a3e992945278 Thomas Andreatta      2025-08-27  143  				}
d9a3e992945278 Thomas Andreatta      2025-08-27  144  
d9a3e992945278 Thomas Andreatta      2025-08-27  145  				schan->pm_state = SHDMA_PM_ESTABLISHED;
d9a3e992945278 Thomas Andreatta      2025-08-27 @146  				ret = pm_runtime_put(schan->dev);
d9a3e992945278 Thomas Andreatta      2025-08-27  147  
d9a3e992945278 Thomas Andreatta      2025-08-27  148  				spin_unlock_irq(&schan->chan_lock);
d9a3e992945278 Thomas Andreatta      2025-08-27  149  				return ret;
d9a3e992945278 Thomas Andreatta      2025-08-27  150  			}
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  151  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  152  			if (schan->pm_state == SHDMA_PM_PENDING)
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  153  				shdma_chan_xfer_ld_queue(schan);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  154  			schan->pm_state = SHDMA_PM_ESTABLISHED;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  155  		}
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  156  	} else {
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  157  		/*
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  158  		 * Tell .device_issue_pending() not to run the queue, interrupts
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  159  		 * will do it anyway
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  160  		 */
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  161  		schan->pm_state = SHDMA_PM_PENDING;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  162  	}
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  163  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  164  	spin_unlock_irq(&schan->chan_lock);
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  165  
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  166  	return cookie;
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  167  }
9a7b8e002e331d Guennadi Liakhovetski 2012-05-09  168  

:::::: The code at line 146 was first introduced by commit
:::::: d9a3e9929452780df16f3414f0d59b5f69d058cf dmaengine: sh: setup_xref error handling

:::::: TO: Thomas Andreatta <thomasandreatta2000@gmail.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>

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

                 reply	other threads:[~2025-12-17 15:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202512172351.Q3FbZRLS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).