On Friday 4 October 2019 13:18:16 CEST Julia Lawall wrote:
> Hello,
> 
> Is an unlock needed on line 53?
> 
> julia
> 
> ---------- Forwarded message ----------
> Date: Fri, 4 Oct 2019 19:14:33 +0800
> From: kbuild test robot <l...@intel.com>
> To: kbu...@01.org
> Cc: Julia Lawall <julia.law...@lip6.fr>
> Subject: [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8:
>     preceding lock on line 38
[...]
> # 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=4f8b7fabb15df3658564a98971fc67029be1815d
> git remote add staging 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> git remote update staging
> git checkout 4f8b7fabb15df3658564a98971fc67029be1815d
> vim +53 drivers/staging/wfx/hif_tx.c
> 
[...]
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @38   
> mutex_lock(&wdev->hif_cmd.lock);
[...]
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  51   // NOTE: no timeout is 
> catched async is enabled
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  52   if (async)
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @53           return 0;

Hello Julia,

No, when async is enabled, unlock is done in hif_generic_confirm()
(hif_rx.c:53).

Note that async is never true in current driver code. Indeed, it implies
to unlock mutex from a different context and lockdep does not seem
to like that.

-- 
Jérôme Pouiller

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to