From: Julia Lawall <julia.lawall@inria.fr>
To: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, kbuild-all@lists.01.org
Subject: drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38 (fwd)
Date: Fri, 10 Jul 2020 13:42:26 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2007101341320.2353@hadrien> (raw)
[-- Attachment #1: Type: text/plain, Size: 4008 bytes --]
Hello,
Please check whether there should be an unlock before line 53.
julia
---------- Forwarded message ----------
Date: Fri, 10 Jul 2020 19:00:10 +0800
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Cc: lkp@intel.com, Julia Lawall <julia.lawall@lip6.fr>
Subject: drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38
CC: kbuild-all@lists.01.org
CC: linux-kernel@vger.kernel.org
TO: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 42f82040ee66db13525dc6f14b8559890b2f4c1c
commit: 4f8b7fabb15df3658564a98971fc67029be1815d staging: wfx: allow to send commands to chip
date: 9 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 9 months ago
config: openrisc-randconfig-c022-20200710 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4f8b7fabb15df3658564a98971fc67029be1815d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 4f8b7fabb15df3658564a98971fc67029be1815d
vim +53 drivers/staging/wfx/hif_tx.c
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 23
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 24 int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, size_t reply_len, bool async)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 25 {
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 26 const char *mib_name = "";
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 27 const char *mib_sep = "";
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 28 int cmd = request->id;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 29 int vif = request->interface;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 30 int ret;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 31
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 32 WARN(wdev->hif_cmd.buf_recv && wdev->hif_cmd.async, "API usage error");
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 33
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 34 // Do not wait for any reply if chip is frozen
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 35 if (wdev->chip_frozen)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 36 return -ETIMEDOUT;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 37
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @38 mutex_lock(&wdev->hif_cmd.lock);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 39 WARN(wdev->hif_cmd.buf_send, "data locking error");
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 40
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 41 // Note: call to complete() below has an implicit memory barrier that
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 42 // hopefully protect buf_send
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 43 wdev->hif_cmd.buf_send = request;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 44 wdev->hif_cmd.buf_recv = reply;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 45 wdev->hif_cmd.len_recv = reply_len;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 46 wdev->hif_cmd.async = async;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 47 complete(&wdev->hif_cmd.ready);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 48
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 49 wfx_bh_request_tx(wdev);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 50
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;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: Type: application/gzip, Size: 22467 bytes --]
next reply other threads:[~2020-07-10 11:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 11:42 Julia Lawall [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-09 8:52 Julia Lawall
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=alpine.DEB.2.22.394.2007101341320.2353@hadrien \
--to=julia.lawall@inria.fr \
--cc=gregkh@linuxfoundation.org \
--cc=jerome.pouiller@silabs.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®