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:22 pm_runtime_depth_test() warn: pm_runtime_get_sync() also returns 1 on success
Date: Thu, 06 Aug 2026 15:51:12 +0800	[thread overview]
Message-ID: <202608061505.Gpk9eHKb-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Brian Norris <briannorris@chromium.org>
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0d839570765118029aa8bf4a95444c6a11aacf85
commit: 7f7acd193ba8aaa8ed07cfadc335bb17a991fd42 PM: runtime: Add basic kunit tests for API contracts
date:   10 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 10 months ago
config: i386-randconfig-141-20260806 (https://download.01.org/0day-ci/archive/20260806/202608061505.Gpk9eHKb-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
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
| Fixes: 7f7acd193ba8 ("PM: runtime: Add basic kunit tests for API contracts")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608061505.Gpk9eHKb-lkp@intel.com/

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

Old smatch warnings:
drivers/base/power/runtime-test.c:78 pm_runtime_idle_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:185 pm_runtime_error_test() warn: pm_runtime_get_sync() also returns 1 on success

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

7f7acd193ba8aaa Brian Norris 2025-09-25  12  
7f7acd193ba8aaa Brian Norris 2025-09-25  13  static void pm_runtime_depth_test(struct kunit *test)
7f7acd193ba8aaa Brian Norris 2025-09-25  14  {
7f7acd193ba8aaa Brian Norris 2025-09-25  15  	struct device *dev = kunit_device_register(test, DEVICE_NAME);
7f7acd193ba8aaa Brian Norris 2025-09-25  16  
7f7acd193ba8aaa Brian Norris 2025-09-25  17  	KUNIT_ASSERT_PTR_NE(test, NULL, dev);
7f7acd193ba8aaa Brian Norris 2025-09-25  18  
7f7acd193ba8aaa Brian Norris 2025-09-25  19  	pm_runtime_enable(dev);
7f7acd193ba8aaa Brian Norris 2025-09-25  20  
7f7acd193ba8aaa Brian Norris 2025-09-25  21  	KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev));
7f7acd193ba8aaa Brian Norris 2025-09-25 @22  	KUNIT_EXPECT_EQ(test, 0, pm_runtime_get_sync(dev));
7f7acd193ba8aaa Brian Norris 2025-09-25  23  	KUNIT_EXPECT_TRUE(test, pm_runtime_active(dev));
7f7acd193ba8aaa Brian Norris 2025-09-25  24  	KUNIT_EXPECT_EQ(test, 1, pm_runtime_get_sync(dev)); /* "already active" */
7f7acd193ba8aaa Brian Norris 2025-09-25  25  	KUNIT_EXPECT_EQ(test, 0, pm_runtime_put_sync(dev));
7f7acd193ba8aaa Brian Norris 2025-09-25  26  	KUNIT_EXPECT_EQ(test, 0, pm_runtime_put_sync(dev));
7f7acd193ba8aaa Brian Norris 2025-09-25  27  	KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev));
7f7acd193ba8aaa Brian Norris 2025-09-25  28  }
7f7acd193ba8aaa Brian Norris 2025-09-25  29  

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

             reply	other threads:[~2026-08-06  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  7:51 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-07 21:58 drivers/base/power/runtime-test.c:22 pm_runtime_depth_test() warn: pm_runtime_get_sync() also returns 1 on success kernel test robot
2026-04-23  7:09 kernel test robot
2026-01-09 10:36 kernel test robot
2026-01-09 11:02 ` Dan Carpenter
2026-01-09 18:39 ` Brian Norris

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=202608061505.Gpk9eHKb-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.