platform/chrome: kunit: initialize lock for fake ec_dev
Subsystems (2)
Tzung-Bi Shih
maintainerPATCH 1/1 platform/chrome: kunit: initialize lock for fake ec_dev
cros_ec_cmd_xfer() uses ec_dev->lock. Initialize it.
Otherwise, dmesg shows the following:
Quoted 8 lines
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
...Call Trace: ? __mutex_lock ? __warn ? __mutex_lock ... ? cros_ec_cmd_xfer
--- drivers/platform/chrome/cros_ec_proto_test.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/chrome/cros_ec_proto_test.c +1 -0
@@ -2668,6 +2668,7 @@ static int cros_ec_proto_test_init(struct kunit *test) ec_dev->dev->release = cros_ec_proto_test_release; ec_dev->cmd_xfer = cros_kunit_ec_xfer_mock; ec_dev->pkt_xfer = cros_kunit_ec_xfer_mock; +mutex_init (&ec_dev->lock); priv->msg = (struct cros_ec_command *)priv->_msg;
Signature · 1 line
2.42.0.582.g8ccd20d70d-goog
Quoted 13 lines · Tzung-Bi Shih
cros_ec_cmd_xfer()usesec_dev->lock. Initialize it.Otherwise, dmesg shows the following:
Quoted 8 lines
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
...Call Trace: ? __mutex_lock ? __warn ? __mutex_lock ... ? cros_ec_cmd_xfer
Quoted 1 line
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 19 lines
--- drivers/platform/chrome/cros_ec_proto_test.c | 1 + 1 file changed, 1 insertion(+)drivers/platform/chrome/cros_ec_proto_test.c +1
-1@@ -2668,6 +2668,7 @@ static int cros_ec_proto_test_init(struct kunit *test) ec_dev->dev->release = cros_ec_proto_test_release; ec_dev->cmd_xfer = cros_kunit_ec_xfer_mock; ec_dev->pkt_xfer = cros_kunit_ec_xfer_mock; +mutex_init (&ec_dev->lock); priv->msg = (struct cros_ec_command *)priv->_msg; --2.42.0.582.g8ccd20d70d-goog
This patch was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Quoted 12 lines · On Tue, 3 Oct 2023 08:05:04 +0000 you wrote:
cros_ec_cmd_xfer()usesec_dev->lock. Initialize it.Otherwise, dmesg shows the following:
Quoted 8 lines
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
...Call Trace: ? __mutex_lock ? __warn ? __mutex_lock ... ? cros_ec_cmd_xfer
Quoted 1 line
[...]
Here is the summary with links:
- platform/chrome: kunit: initialize lock for fake ec_dev
https://git.kernel.org/chrome-platform/c/e410b4ade83d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
This patch was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Hello:
This patch was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Quoted 12 lines · On Tue, 3 Oct 2023 08:05:04 +0000 you wrote:
cros_ec_cmd_xfer()usesec_dev->lock. Initialize it.Otherwise, dmesg shows the following:
Quoted 8 lines
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
...Call Trace: ? __mutex_lock ? __warn ? __mutex_lock ... ? cros_ec_cmd_xfer
Quoted 1 line
[...]
Here is the summary with links:
- platform/chrome: kunit: initialize lock for fake ec_dev
https://git.kernel.org/chrome-platform/c/e410b4ade83d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html