From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Anilkumar Kolli <akolli@codeaurora.org>
Cc: Kalle Valo <kvalo@codeaurora.org>,
kbuild-all@01.org, ath10k@lists.infradead.org
Subject: [ath6kl:ath11k-bringup 89/93] drivers/net/wireless/ath/ath11k/core.c:621 ath11k_qmi_firmware_indication() warn: inconsistent returns 'mutex:&ab->core_lock'.
Date: Mon, 15 Apr 2019 11:10:03 +0300 [thread overview]
Message-ID: <20190415081003.GL31633@kadam> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath11k-bringup
head: 9bcbbf4cedb7a1f30cb547cf87dc480d7f8a5e87
commit: 426598fdbef82ace7b4a728445f61ecf034f233c [89/93] ath11k: add qmi API support and rproc_boot for Q6
New smatch warnings:
drivers/net/wireless/ath/ath11k/core.c:621 ath11k_qmi_firmware_indication() warn: inconsistent returns 'mutex:&ab->core_lock'.
Locked on: line 621
Unlocked on: line 591
Locked on: line 714
Unlocked on: line 747
# https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=426598fdbef82ace7b4a728445f61ecf034f233c
git remote add ath6kl https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
git remote update ath6kl
git checkout 426598fdbef82ace7b4a728445f61ecf034f233c
vim +621 drivers/net/wireless/ath/ath11k/core.c
426598fd Anilkumar Kolli 2019-04-04 584 int ath11k_qmi_firmware_indication(struct ath11k_base *ab)
426598fd Anilkumar Kolli 2019-04-04 585 {
426598fd Anilkumar Kolli 2019-04-04 586 int ret;
426598fd Anilkumar Kolli 2019-04-04 587
426598fd Anilkumar Kolli 2019-04-04 588 ret = ath11k_ce_init_pipes(ab);
426598fd Anilkumar Kolli 2019-04-04 589 if (ret) {
426598fd Anilkumar Kolli 2019-04-04 590 ath11k_err(ab, "failed to initialize CE: %d\n", ret);
426598fd Anilkumar Kolli 2019-04-04 591 return ret;
426598fd Anilkumar Kolli 2019-04-04 592 }
426598fd Anilkumar Kolli 2019-04-04 593
426598fd Anilkumar Kolli 2019-04-04 594 ret = ath11k_dp_alloc(ab);
426598fd Anilkumar Kolli 2019-04-04 595 if (ret) {
426598fd Anilkumar Kolli 2019-04-04 596 ath11k_err(ab, "failed to init DP: %d\n", ret);
426598fd Anilkumar Kolli 2019-04-04 597 return ret;
426598fd Anilkumar Kolli 2019-04-04 598 }
426598fd Anilkumar Kolli 2019-04-04 599
426598fd Anilkumar Kolli 2019-04-04 600 mutex_lock(&ab->core_lock);
^^^^^^^^^^^^^^
The static checker doesn't complain but is this a double lock actually?
It looks like we took the lock eaerlier in ath11k_core_restart(). This
is restart code so it's probably hard to test.
426598fd Anilkumar Kolli 2019-04-04 601 ret = ath11k_core_start(ab, ATH11K_FIRMWARE_MODE_NORMAL);
426598fd Anilkumar Kolli 2019-04-04 602 if (ret) {
426598fd Anilkumar Kolli 2019-04-04 603 ath11k_err(ab, "failed to start core: %d\n", ret);
426598fd Anilkumar Kolli 2019-04-04 604 goto err_dp_free;
^^^^^^^^^^^^^^^^
426598fd Anilkumar Kolli 2019-04-04 605 }
426598fd Anilkumar Kolli 2019-04-04 606
426598fd Anilkumar Kolli 2019-04-04 607 ret = ath11k_core_pdev_create(ab);
426598fd Anilkumar Kolli 2019-04-04 608 if (ret) {
426598fd Anilkumar Kolli 2019-04-04 609 ath11k_err(ab, "failed to create pdev core: %d\n", ret);
426598fd Anilkumar Kolli 2019-04-04 610 goto err_core_stop;
426598fd Anilkumar Kolli 2019-04-04 611 }
426598fd Anilkumar Kolli 2019-04-04 612 ath11k_ahb_ext_irq_enable(ab);
426598fd Anilkumar Kolli 2019-04-04 613 mutex_unlock(&ab->core_lock);
426598fd Anilkumar Kolli 2019-04-04 614
426598fd Anilkumar Kolli 2019-04-04 615 return 0;
426598fd Anilkumar Kolli 2019-04-04 616
426598fd Anilkumar Kolli 2019-04-04 617 err_core_stop:
426598fd Anilkumar Kolli 2019-04-04 618 ath11k_core_stop(ab);
426598fd Anilkumar Kolli 2019-04-04 619 err_dp_free:
426598fd Anilkumar Kolli 2019-04-04 620 ath11k_dp_free(ab);
426598fd Anilkumar Kolli 2019-04-04 @621 return ret;
426598fd Anilkumar Kolli 2019-04-04 622 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
reply other threads:[~2019-04-15 8:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190415081003.GL31633@kadam \
--to=dan.carpenter@oracle.com \
--cc=akolli@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=kbuild-all@01.org \
--cc=kbuild@01.org \
--cc=kvalo@codeaurora.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