Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [bvanassche:thread-safety 36/36] drivers/fpga/tests/fpga-bridge-test.c:89:2: warning: releasing mutex 'ctx->bridge->mutex' that was not held
@ 2025-02-08 16:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-08 16:27 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/bvanassche/linux thread-safety
head:   ce14c650535d31959070629f347cb214f6e51d3d
commit: ce14c650535d31959070629f347cb214f6e51d3d [36/36] scripts/Makefile.clang: Unconditionally enable thread-safety checking
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: hexagon-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250207/202502071055.yME9ASTo-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project ee3bccab34f57387bdf33853cdd5f214fef349a2)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250207/202502071055.yME9ASTo-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/r/202502071055.yME9ASTo-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/fpga/tests/fpga-bridge-test.c:89:2: warning: releasing mutex 'ctx->bridge->mutex' that was not held [-Wthread-safety-analysis]
      89 |         fpga_bridge_put(ctx->bridge);
         |         ^
   1 warning generated.
--
>> drivers/fpga/tests/fpga-mgr-test.c:224:2: warning: releasing mutex 'ctx->mgr->ref_mutex' that was not held [-Wthread-safety-analysis]
     224 |         fpga_mgr_unlock(ctx->mgr);
         |         ^
   1 warning generated.


vim +89 drivers/fpga/tests/fpga-bridge-test.c

9e6823481e5f6f Marco Pagani 2023-07-18  77  
9e6823481e5f6f Marco Pagani 2023-07-18  78  static void fpga_bridge_test_get(struct kunit *test)
9e6823481e5f6f Marco Pagani 2023-07-18  79  {
9e6823481e5f6f Marco Pagani 2023-07-18  80  	struct bridge_ctx *ctx = test->priv;
9e6823481e5f6f Marco Pagani 2023-07-18  81  	struct fpga_bridge *bridge;
9e6823481e5f6f Marco Pagani 2023-07-18  82  
4d2bc3f7dea4d1 Marco Pagani 2024-03-29  83  	bridge = fpga_bridge_get(ctx->dev, NULL);
9e6823481e5f6f Marco Pagani 2023-07-18  84  	KUNIT_EXPECT_PTR_EQ(test, bridge, ctx->bridge);
9e6823481e5f6f Marco Pagani 2023-07-18  85  
4d2bc3f7dea4d1 Marco Pagani 2024-03-29  86  	bridge = fpga_bridge_get(ctx->dev, NULL);
9e6823481e5f6f Marco Pagani 2023-07-18  87  	KUNIT_EXPECT_EQ(test, PTR_ERR(bridge), -EBUSY);
9e6823481e5f6f Marco Pagani 2023-07-18  88  
9e6823481e5f6f Marco Pagani 2023-07-18 @89  	fpga_bridge_put(ctx->bridge);
9e6823481e5f6f Marco Pagani 2023-07-18  90  }
9e6823481e5f6f Marco Pagani 2023-07-18  91  

:::::: The code at line 89 was first introduced by commit
:::::: 9e6823481e5f6f2d4f4b43b6f3b00ace21b83f25 fpga: add an initial KUnit suite for the FPGA Bridge

:::::: TO: Marco Pagani <marpagan@redhat.com>
:::::: CC: Xu Yilun <yilun.xu@intel.com>

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-08 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 16:27 [bvanassche:thread-safety 36/36] drivers/fpga/tests/fpga-bridge-test.c:89:2: warning: releasing mutex 'ctx->bridge->mutex' that was not held kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox