All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/base/power/runtime-test.c:368 pm_runtime_pending_teardown_test() warn: pm_runtime_get_sync() also returns 1 on success
Date: Thu, 08 Oct 2026 08:00:58 +0200	[thread overview]
Message-ID: <202610080756.OSy2UU1U-lkp@intel.com> (raw)

Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Brian Norris <briannorris@chromium.org>
CC: 0day robot <lkp@intel.com>

tree:   https://github.com/intel-lab-lkp/linux/commits/Brian-Norris/PM-runtime-Cancel-pending-only-during-non-transient-suspend-failure/20260929-114711
head:   dfc97fdf56151a722171601bd1b6278d4fb54f0b
commit: dfc97fdf56151a722171601bd1b6278d4fb54f0b PM: runtime: Add test for pending-autosuspend + teardown
date:   8 days ago
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
config: i386-randconfig-2200-20261006 (https://download.01.org/0day-ci/archive/20261008/202610080756.OSy2UU1U-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch: v0.5.0-9187-g5189e3fb

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/202610080756.OSy2UU1U-lkp@intel.com/

New smatch warnings:
drivers/base/power/runtime-test.c:368 pm_runtime_pending_teardown_test() warn: pm_runtime_get_sync() also returns 1 on success

Old smatch warnings:
drivers/base/power/runtime-test.c:23 pm_runtime_depth_test() warn: pm_runtime_get_sync() also returns 1 on success
drivers/base/power/runtime-test.c:75 pm_runtime_idle_test() warn: pm_runtime_get_sync() also returns 1 on success
drivers/base/power/runtime-test.c:179 pm_runtime_error_test() warn: pm_runtime_get_sync() also returns 1 on success
drivers/base/power/runtime-test.c:182 pm_runtime_error_test() warn: pm_runtime_get_sync() also returns 1 on success
drivers/base/power/runtime-test.c:258 pm_runtime_supplier_suspend_test() warn: pm_runtime_get_sync() also returns 1 on success
drivers/base/power/runtime-test.c:264 pm_runtime_supplier_suspend_test() warn: pm_runtime_get_sync() also returns 1 on success

vim +368 drivers/base/power/runtime-test.c

dd53d089b9af929 Brian Norris 2026-09-29  356  
dfc97fdf56151a7 Brian Norris 2026-09-29  357  static void pm_runtime_pending_teardown_test(struct kunit *test)
dfc97fdf56151a7 Brian Norris 2026-09-29  358  {
dfc97fdf56151a7 Brian Norris 2026-09-29  359  	struct device *dev = kunit_device_register(test, DEVICE_NAME);
dfc97fdf56151a7 Brian Norris 2026-09-29  360  
dfc97fdf56151a7 Brian Norris 2026-09-29  361  	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev);
dfc97fdf56151a7 Brian Norris 2026-09-29  362  
dfc97fdf56151a7 Brian Norris 2026-09-29  363  	pm_runtime_enable(dev);
dfc97fdf56151a7 Brian Norris 2026-09-29  364  	pm_runtime_use_autosuspend(dev);
dfc97fdf56151a7 Brian Norris 2026-09-29  365  
dfc97fdf56151a7 Brian Norris 2026-09-29  366  	KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev));
dfc97fdf56151a7 Brian Norris 2026-09-29  367  
dfc97fdf56151a7 Brian Norris 2026-09-29 @368  	KUNIT_EXPECT_EQ(test, 0, pm_runtime_get_sync(dev));
dfc97fdf56151a7 Brian Norris 2026-09-29  369  	KUNIT_EXPECT_TRUE(test, pm_runtime_active(dev));
dfc97fdf56151a7 Brian Norris 2026-09-29  370  
dfc97fdf56151a7 Brian Norris 2026-09-29  371  	/* Queue a RPM_REQ_AUTOSUSPEND (immediately, as autosuspend_delay is 0) */
dfc97fdf56151a7 Brian Norris 2026-09-29  372  	KUNIT_EXPECT_EQ(test, 0, pm_runtime_put_autosuspend(dev));
dfc97fdf56151a7 Brian Norris 2026-09-29  373  
dfc97fdf56151a7 Brian Norris 2026-09-29  374  	/*
dfc97fdf56151a7 Brian Norris 2026-09-29  375  	 * This is expected to quiesce a pending auto-suspend. See especially
dfc97fdf56151a7 Brian Norris 2026-09-29  376  	 * devm_pm_runtime_enable() -> pm_runtime_disable_action().
dfc97fdf56151a7 Brian Norris 2026-09-29  377  	 */
dfc97fdf56151a7 Brian Norris 2026-09-29  378  	pm_runtime_dont_use_autosuspend(dev);
dfc97fdf56151a7 Brian Norris 2026-09-29  379  
dfc97fdf56151a7 Brian Norris 2026-09-29  380  	KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev));
dfc97fdf56151a7 Brian Norris 2026-09-29  381  }
dfc97fdf56151a7 Brian Norris 2026-09-29  382  

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

                 reply	other threads:[~2026-10-08  6:01 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=202610080756.OSy2UU1U-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.