From: kernel test robot <lkp@intel.com>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linmq006@gmail.com,
Jean-Christophe Trotin <jean-christophe.trotin@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org,
Peter Griffin <peter.griffin@linaro.org>,
Yannick Fertre <yannick.fertre@st.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe
Date: Thu, 6 Jan 2022 07:59:20 +0800 [thread overview]
Message-ID: <202201060723.hf79WNhw-lkp@intel.com> (raw)
In-Reply-To: <20220105113104.7783-1-linmq006@gmail.com>
Hi Miaoqian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on media-tree/master]
[also build test WARNING on v5.16-rc8 next-20220105]
[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]
url: https://github.com/0day-ci/linux/commits/Miaoqian-Lin/media-st-hva-Fix-PM-disable-depth-imbalance-in-hva_hw_probe/20220105-193232
base: git://linuxtv.org/media_tree.git master
config: riscv-randconfig-r022-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060723.hf79WNhw-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/47b1ca3ed69ff8b4ac772d1630776ec5366076c1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Miaoqian-Lin/media-st-hva-Fix-PM-disable-depth-imbalance-in-hva_hw_probe/20220105-193232
git checkout 47b1ca3ed69ff8b4ac772d1630776ec5366076c1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/media/platform/sti/hva/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/platform/sti/hva/hva-hw.c:411:1: warning: unused label 'disable_pm_runtime' [-Wunused-label]
disable_pm_runtime:
^~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +/disable_pm_runtime +411 drivers/media/platform/sti/hva/hva-hw.c
297
298 int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)
299 {
300 struct device *dev = &pdev->dev;
301 struct resource *esram;
302 int ret;
303
304 WARN_ON(!hva);
305
306 /* get memory for registers */
307 hva->regs = devm_platform_ioremap_resource(pdev, 0);
308 if (IS_ERR(hva->regs)) {
309 dev_err(dev, "%s failed to get regs\n", HVA_PREFIX);
310 return PTR_ERR(hva->regs);
311 }
312
313 /* get memory for esram */
314 esram = platform_get_resource(pdev, IORESOURCE_MEM, 1);
315 if (!esram) {
316 dev_err(dev, "%s failed to get esram\n", HVA_PREFIX);
317 return -ENODEV;
318 }
319 hva->esram_addr = esram->start;
320 hva->esram_size = resource_size(esram);
321
322 dev_info(dev, "%s esram reserved for address: 0x%x size:%d\n",
323 HVA_PREFIX, hva->esram_addr, hva->esram_size);
324
325 /* get clock resource */
326 hva->clk = devm_clk_get(dev, "clk_hva");
327 if (IS_ERR(hva->clk)) {
328 dev_err(dev, "%s failed to get clock\n", HVA_PREFIX);
329 return PTR_ERR(hva->clk);
330 }
331
332 ret = clk_prepare(hva->clk);
333 if (ret < 0) {
334 dev_err(dev, "%s failed to prepare clock\n", HVA_PREFIX);
335 hva->clk = ERR_PTR(-EINVAL);
336 return ret;
337 }
338
339 /* get status interruption resource */
340 ret = platform_get_irq(pdev, 0);
341 if (ret < 0)
342 goto err_clk;
343 hva->irq_its = ret;
344
345 ret = devm_request_threaded_irq(dev, hva->irq_its, hva_hw_its_interrupt,
346 hva_hw_its_irq_thread,
347 IRQF_ONESHOT,
348 "hva_its_irq", hva);
349 if (ret) {
350 dev_err(dev, "%s failed to install status IRQ 0x%x\n",
351 HVA_PREFIX, hva->irq_its);
352 goto err_clk;
353 }
354 disable_irq(hva->irq_its);
355
356 /* get error interruption resource */
357 ret = platform_get_irq(pdev, 1);
358 if (ret < 0)
359 goto err_clk;
360 hva->irq_err = ret;
361
362 ret = devm_request_threaded_irq(dev, hva->irq_err, hva_hw_err_interrupt,
363 hva_hw_err_irq_thread,
364 IRQF_ONESHOT,
365 "hva_err_irq", hva);
366 if (ret) {
367 dev_err(dev, "%s failed to install error IRQ 0x%x\n",
368 HVA_PREFIX, hva->irq_err);
369 goto err_clk;
370 }
371 disable_irq(hva->irq_err);
372
373 /* initialise protection mutex */
374 mutex_init(&hva->protect_mutex);
375
376 /* initialise completion signal */
377 init_completion(&hva->interrupt);
378
379 /* initialise runtime power management */
380 pm_runtime_set_autosuspend_delay(dev, AUTOSUSPEND_DELAY_MS);
381 pm_runtime_use_autosuspend(dev);
382 pm_runtime_set_suspended(dev);
383 pm_runtime_enable(dev);
384
385 ret = pm_runtime_resume_and_get(dev);
386 if (ret < 0) {
387 dev_err(dev, "%s failed to set PM\n", HVA_PREFIX);
388 goto err_disable;
389 }
390
391 /* check IP hardware version */
392 hva->ip_version = hva_hw_get_ip_version(hva);
393
394 if (hva->ip_version == HVA_VERSION_UNKNOWN) {
395 ret = -EINVAL;
396 goto err_pm;
397 }
398
399 dev_info(dev, "%s found hva device (version 0x%lx)\n", HVA_PREFIX,
400 hva->ip_version);
401
402 return 0;
403
404 err_pm:
405 pm_runtime_put(dev);
406 err_disable:
407 pm_runtime_disable(dev);
408 err_clk:
409 if (hva->clk)
410 clk_unprepare(hva->clk);
> 411 disable_pm_runtime:
412 pm_runtime_disable(dev);
413 return ret;
414 }
415
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe
Date: Thu, 06 Jan 2022 07:59:20 +0800 [thread overview]
Message-ID: <202201060723.hf79WNhw-lkp@intel.com> (raw)
In-Reply-To: <20220105113104.7783-1-linmq006@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6015 bytes --]
Hi Miaoqian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on media-tree/master]
[also build test WARNING on v5.16-rc8 next-20220105]
[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]
url: https://github.com/0day-ci/linux/commits/Miaoqian-Lin/media-st-hva-Fix-PM-disable-depth-imbalance-in-hva_hw_probe/20220105-193232
base: git://linuxtv.org/media_tree.git master
config: riscv-randconfig-r022-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060723.hf79WNhw-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/47b1ca3ed69ff8b4ac772d1630776ec5366076c1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Miaoqian-Lin/media-st-hva-Fix-PM-disable-depth-imbalance-in-hva_hw_probe/20220105-193232
git checkout 47b1ca3ed69ff8b4ac772d1630776ec5366076c1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/media/platform/sti/hva/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/platform/sti/hva/hva-hw.c:411:1: warning: unused label 'disable_pm_runtime' [-Wunused-label]
disable_pm_runtime:
^~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +/disable_pm_runtime +411 drivers/media/platform/sti/hva/hva-hw.c
297
298 int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)
299 {
300 struct device *dev = &pdev->dev;
301 struct resource *esram;
302 int ret;
303
304 WARN_ON(!hva);
305
306 /* get memory for registers */
307 hva->regs = devm_platform_ioremap_resource(pdev, 0);
308 if (IS_ERR(hva->regs)) {
309 dev_err(dev, "%s failed to get regs\n", HVA_PREFIX);
310 return PTR_ERR(hva->regs);
311 }
312
313 /* get memory for esram */
314 esram = platform_get_resource(pdev, IORESOURCE_MEM, 1);
315 if (!esram) {
316 dev_err(dev, "%s failed to get esram\n", HVA_PREFIX);
317 return -ENODEV;
318 }
319 hva->esram_addr = esram->start;
320 hva->esram_size = resource_size(esram);
321
322 dev_info(dev, "%s esram reserved for address: 0x%x size:%d\n",
323 HVA_PREFIX, hva->esram_addr, hva->esram_size);
324
325 /* get clock resource */
326 hva->clk = devm_clk_get(dev, "clk_hva");
327 if (IS_ERR(hva->clk)) {
328 dev_err(dev, "%s failed to get clock\n", HVA_PREFIX);
329 return PTR_ERR(hva->clk);
330 }
331
332 ret = clk_prepare(hva->clk);
333 if (ret < 0) {
334 dev_err(dev, "%s failed to prepare clock\n", HVA_PREFIX);
335 hva->clk = ERR_PTR(-EINVAL);
336 return ret;
337 }
338
339 /* get status interruption resource */
340 ret = platform_get_irq(pdev, 0);
341 if (ret < 0)
342 goto err_clk;
343 hva->irq_its = ret;
344
345 ret = devm_request_threaded_irq(dev, hva->irq_its, hva_hw_its_interrupt,
346 hva_hw_its_irq_thread,
347 IRQF_ONESHOT,
348 "hva_its_irq", hva);
349 if (ret) {
350 dev_err(dev, "%s failed to install status IRQ 0x%x\n",
351 HVA_PREFIX, hva->irq_its);
352 goto err_clk;
353 }
354 disable_irq(hva->irq_its);
355
356 /* get error interruption resource */
357 ret = platform_get_irq(pdev, 1);
358 if (ret < 0)
359 goto err_clk;
360 hva->irq_err = ret;
361
362 ret = devm_request_threaded_irq(dev, hva->irq_err, hva_hw_err_interrupt,
363 hva_hw_err_irq_thread,
364 IRQF_ONESHOT,
365 "hva_err_irq", hva);
366 if (ret) {
367 dev_err(dev, "%s failed to install error IRQ 0x%x\n",
368 HVA_PREFIX, hva->irq_err);
369 goto err_clk;
370 }
371 disable_irq(hva->irq_err);
372
373 /* initialise protection mutex */
374 mutex_init(&hva->protect_mutex);
375
376 /* initialise completion signal */
377 init_completion(&hva->interrupt);
378
379 /* initialise runtime power management */
380 pm_runtime_set_autosuspend_delay(dev, AUTOSUSPEND_DELAY_MS);
381 pm_runtime_use_autosuspend(dev);
382 pm_runtime_set_suspended(dev);
383 pm_runtime_enable(dev);
384
385 ret = pm_runtime_resume_and_get(dev);
386 if (ret < 0) {
387 dev_err(dev, "%s failed to set PM\n", HVA_PREFIX);
388 goto err_disable;
389 }
390
391 /* check IP hardware version */
392 hva->ip_version = hva_hw_get_ip_version(hva);
393
394 if (hva->ip_version == HVA_VERSION_UNKNOWN) {
395 ret = -EINVAL;
396 goto err_pm;
397 }
398
399 dev_info(dev, "%s found hva device (version 0x%lx)\n", HVA_PREFIX,
400 hva->ip_version);
401
402 return 0;
403
404 err_pm:
405 pm_runtime_put(dev);
406 err_disable:
407 pm_runtime_disable(dev);
408 err_clk:
409 if (hva->clk)
410 clk_unprepare(hva->clk);
> 411 disable_pm_runtime:
412 pm_runtime_disable(dev);
413 return ret;
414 }
415
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2022-01-06 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 11:31 [PATCH] media: st-hva: Fix PM disable depth imbalance in hva_hw_probe Miaoqian Lin
2022-01-05 23:59 ` kernel test robot [this message]
2022-01-05 23:59 ` 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=202201060723.hf79WNhw-lkp@intel.com \
--to=lkp@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=jean-christophe.trotin@foss.st.com \
--cc=kbuild-all@lists.01.org \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=peter.griffin@linaro.org \
--cc=yannick.fertre@st.com \
/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.