[jpirko-mlxsw:linecards 110/112] drivers/platform/mellanox/mlxreg-lc.c:485:1-7: preceding lock on line 469 (fwd)
From: Julia Lawall
Date: Sat Aug 28 2021 - 07:07:21 EST
This looks suspicious. Maybe the fail label shoudl be before line 482 to
include the unlock?
julia
---------- Forwarded message ----------
Date: Thu, 26 Aug 2021 05:55:03 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
Subject: [jpirko-mlxsw:linecards 110/112]
drivers/platform/mellanox/mlxreg-lc.c:485:1-7: preceding lock on line 469
CC: kbuild-all@xxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
TO: Vadim Pasternak <vadimp@xxxxxxxxxx>
CC: Jiri Pirko <jiri@xxxxxxxxxx>
tree: https://github.com/jpirko/linux_mlxsw linecards
head: a37df1af1f3e6a47a9718298d5e50b842f79b2d2
commit: fbdba1b20b39b5e3b79d6df5b44cc5be3a0ddc0c [110/112] TMP: platform/mellanox
:::::: branch date: 9 hours ago
:::::: commit date: 12 hours ago
config: xtensa-randconfig-c023-20210825 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Julia Lawall <julia.lawall@xxxxxxx>
cocci warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxreg-lc.c:485:1-7: preceding lock on line 469
vim +485 drivers/platform/mellanox/mlxreg-lc.c
b386a25dac45ae Vadim Pasternak 2021-03-25 463
b386a25dac45ae Vadim Pasternak 2021-03-25 464 static int mlxreg_lc_power_on_off(struct mlxreg_lc *mlxreg_lc, u8 action)
b386a25dac45ae Vadim Pasternak 2021-03-25 465 {
b386a25dac45ae Vadim Pasternak 2021-03-25 466 u32 regval;
b386a25dac45ae Vadim Pasternak 2021-03-25 467 int err;
b386a25dac45ae Vadim Pasternak 2021-03-25 468
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 @469 mutex_lock(&mlxreg_lc->lock);
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 470
b386a25dac45ae Vadim Pasternak 2021-03-25 471 err = regmap_read(mlxreg_lc->par_regmap, mlxreg_lc->data->reg_pwr, ®val);
b386a25dac45ae Vadim Pasternak 2021-03-25 472 if (err)
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 473 goto regmap_read_fail;
b386a25dac45ae Vadim Pasternak 2021-03-25 474
b386a25dac45ae Vadim Pasternak 2021-03-25 475 if (action)
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 476 regval |= BIT(mlxreg_lc->data->slot - 1);
b386a25dac45ae Vadim Pasternak 2021-03-25 477 else
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 478 regval &= ~BIT(mlxreg_lc->data->slot - 1);
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 479
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 480 err = regmap_write(mlxreg_lc->par_regmap, mlxreg_lc->data->reg_pwr, regval);
b386a25dac45ae Vadim Pasternak 2021-03-25 481
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 482 mutex_unlock(&mlxreg_lc->lock);
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 483
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 484 regmap_read_fail:
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 @485 return err;
b386a25dac45ae Vadim Pasternak 2021-03-25 486 }
b386a25dac45ae Vadim Pasternak 2021-03-25 487
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxxAttachment:
.config.gz
Description: application/gzip