driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"kbuild-all@01.org" <kbuild-all@01.org>
Subject: Re: [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38 (fwd)
Date: Fri, 4 Oct 2019 16:45:31 +0000	[thread overview]
Message-ID: <1627155.rAfr8t8Vmh@pc-42> (raw)
In-Reply-To: <alpine.DEB.2.21.1910041317381.2992@hadrien>

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 <lkp@intel.com>
> To: kbuild@01.org
> Cc: Julia Lawall <julia.lawall@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
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

      reply	other threads:[~2019-10-04 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 11:18 [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38 (fwd) Julia Lawall
2019-10-04 16:45 ` Jerome Pouiller [this message]

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=1627155.rAfr8t8Vmh@pc-42 \
    --to=jerome.pouiller@silabs.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@lip6.fr \
    --cc=kbuild-all@01.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).