From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/dma/at_xdmac.c:2187 atmel_xdmac_resume() warn: 'atxdmac->clk' from clk_prepare_enable() not released on lines: 2170.
Date: Sat, 25 Nov 2023 07:38:53 +0800 [thread overview]
Message-ID: <202311250452.4tpB3JSy-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Claudiu Beznea <claudiu.beznea@microchip.com>
CC: Vinod Koul <vkoul@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5b7ad877e4d81f8904ce83982b1ba5c6e83deccb
commit: 2de5ddb5e68c94b781b3789bca1ce52000d7d0e0 dmaengine: at_xdmac: disable/enable clock directly on suspend/resume
date: 8 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 8 months ago
config: arm-randconfig-r081-20231123 (https://download.01.org/0day-ci/archive/20231125/202311250452.4tpB3JSy-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231125/202311250452.4tpB3JSy-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311250452.4tpB3JSy-lkp@intel.com/
New smatch warnings:
drivers/dma/at_xdmac.c:2187 atmel_xdmac_resume() warn: 'atxdmac->clk' from clk_prepare_enable() not released on lines: 2170.
Old smatch warnings:
drivers/dma/at_xdmac.c:1128 at_xdmac_prep_interleaved() warn: address of NULL pointer 'first'
drivers/dma/at_xdmac.c:1426 at_xdmac_prep_dma_memset_sg() error: we previously assumed 'psg' could be null (see line 1401)
drivers/dma/at_xdmac.c:1499 at_xdmac_prep_dma_memset_sg() error: we previously assumed 'pdesc' could be null (see line 1424)
vim +2187 drivers/dma/at_xdmac.c
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2139
b183d41a340b22 Claudiu Beznea 2021-10-07 2140 static int __maybe_unused atmel_xdmac_resume(struct device *dev)
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2141 {
ede2b295033f52 Wolfram Sang 2018-04-22 2142 struct at_xdmac *atxdmac = dev_get_drvdata(dev);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2143 struct at_xdmac_chan *atchan;
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2144 struct dma_chan *chan, *_chan;
fa5270ec2f2688 Claudiu Beznea 2021-10-07 2145 struct platform_device *pdev = container_of(dev, struct platform_device, dev);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2146 int i;
87c56dcba45734 Arvind Yadav 2017-08-07 2147 int ret;
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2148
2de5ddb5e68c94 Claudiu Beznea 2023-02-14 2149 ret = clk_prepare_enable(atxdmac->clk);
2de5ddb5e68c94 Claudiu Beznea 2023-02-14 2150 if (ret)
87c56dcba45734 Arvind Yadav 2017-08-07 2151 return ret;
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2152
2de5ddb5e68c94 Claudiu Beznea 2023-02-14 2153 pm_runtime_get_noresume(atxdmac->dev);
2de5ddb5e68c94 Claudiu Beznea 2023-02-14 2154
fa5270ec2f2688 Claudiu Beznea 2021-10-07 2155 at_xdmac_axi_config(pdev);
fa5270ec2f2688 Claudiu Beznea 2021-10-07 2156
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2157 /* Clear pending interrupts. */
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2158 for (i = 0; i < atxdmac->dma.chancnt; i++) {
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2159 atchan = &atxdmac->chan[i];
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2160 while (at_xdmac_chan_read(atchan, AT_XDMAC_CIS))
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2161 cpu_relax();
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2162 }
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2163
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2164 at_xdmac_write(atxdmac, AT_XDMAC_GIE, atxdmac->save_gim);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2165 list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) {
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2166 atchan = to_at_xdmac_chan(chan);
650b0e990cbd7e Claudiu Beznea 2022-11-17 2167
650b0e990cbd7e Claudiu Beznea 2022-11-17 2168 ret = at_xdmac_runtime_resume_descriptors(atchan);
650b0e990cbd7e Claudiu Beznea 2022-11-17 2169 if (ret < 0)
650b0e990cbd7e Claudiu Beznea 2022-11-17 2170 return ret;
650b0e990cbd7e Claudiu Beznea 2022-11-17 2171
734bb9a7b3e198 Ludovic Desroches 2015-01-27 2172 at_xdmac_chan_write(atchan, AT_XDMAC_CC, atchan->save_cc);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2173 if (at_xdmac_chan_is_cyclic(atchan)) {
611dcadb01c89d Songjun Wu 2016-01-18 2174 if (at_xdmac_chan_is_paused(atchan))
611dcadb01c89d Songjun Wu 2016-01-18 2175 at_xdmac_device_resume(chan);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2176 at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, atchan->save_cnda);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2177 at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2178 at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2179 wmb();
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2180 at_xdmac_write(atxdmac, AT_XDMAC_GE, atchan->mask);
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2181 }
e1f7c9eee70730 Ludovic Desroches 2014-10-22 2182 }
650b0e990cbd7e Claudiu Beznea 2022-11-17 2183
650b0e990cbd7e Claudiu Beznea 2022-11-17 2184 pm_runtime_mark_last_busy(atxdmac->dev);
650b0e990cbd7e Claudiu Beznea 2022-11-17 2185 pm_runtime_put_autosuspend(atxdmac->dev);
650b0e990cbd7e Claudiu Beznea 2022-11-17 2186
650b0e990cbd7e Claudiu Beznea 2022-11-17 @2187 return 0;
650b0e990cbd7e Claudiu Beznea 2022-11-17 2188 }
650b0e990cbd7e Claudiu Beznea 2022-11-17 2189
:::::: The code at line 2187 was first introduced by commit
:::::: 650b0e990cbd7e214251a173460f79f3681e8233 dmaengine: at_xdmac: add runtime pm support
:::::: TO: Claudiu Beznea <claudiu.beznea@microchip.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-11-24 23:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 23:38 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-08-17 8:51 drivers/dma/at_xdmac.c:2187 atmel_xdmac_resume() warn: 'atxdmac->clk' from clk_prepare_enable() not released on lines: 2170 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=202311250452.4tpB3JSy-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 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.