From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Manish Mandlik <mmandlik@google.com>,
marcel@holtmann.org, luiz.dentz@gmail.com
Cc: lkp@intel.com, kbuild-all@lists.01.org,
chromeos-bluetooth-upstreaming@chromium.org,
linux-bluetooth@vger.kernel.org,
Manish Mandlik <mmandlik@google.com>,
Miao-chen Chou <mcchou@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [kbuild] Re: [PATCH v9 1/3] bluetooth: msft: Handle MSFT Monitor Device Event
Date: Fri, 17 Dec 2021 10:17:18 +0300 [thread overview]
Message-ID: <202112171439.KaggScQN-lkp@intel.com> (raw)
In-Reply-To: <20211216044839.v9.1.Ic0a40b84dee3825302890aaea690e73165c71820@changeid>
Hi Manish,
url: https://github.com/0day-ci/linux/commits/Manish-Mandlik/bluetooth-msft-Handle-MSFT-Monitor-Device-Event/20211216-205227
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: i386-randconfig-m021-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171439.KaggScQN-lkp@intel.com/config )
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
net/bluetooth/msft.c:757 msft_vendor_evt() warn: inconsistent returns '&hdev->lock'.
vim +757 net/bluetooth/msft.c
3e54c5890c87a30 Luiz Augusto von Dentz 2021-12-01 714 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb)
145373cb1b1fcdb Miao-chen Chou 2020-04-03 715 {
145373cb1b1fcdb Miao-chen Chou 2020-04-03 716 struct msft_data *msft = hdev->msft_data;
e5af6a85decc8c1 Manish Mandlik 2021-12-16 717 u8 *evt_prefix;
e5af6a85decc8c1 Manish Mandlik 2021-12-16 718 u8 *evt;
145373cb1b1fcdb Miao-chen Chou 2020-04-03 719
145373cb1b1fcdb Miao-chen Chou 2020-04-03 720 if (!msft)
145373cb1b1fcdb Miao-chen Chou 2020-04-03 721 return;
145373cb1b1fcdb Miao-chen Chou 2020-04-03 722
145373cb1b1fcdb Miao-chen Chou 2020-04-03 723 /* When the extension has defined an event prefix, check that it
145373cb1b1fcdb Miao-chen Chou 2020-04-03 724 * matches, and otherwise just return.
145373cb1b1fcdb Miao-chen Chou 2020-04-03 725 */
145373cb1b1fcdb Miao-chen Chou 2020-04-03 726 if (msft->evt_prefix_len > 0) {
e5af6a85decc8c1 Manish Mandlik 2021-12-16 727 evt_prefix = msft_skb_pull(hdev, skb, 0, msft->evt_prefix_len);
e5af6a85decc8c1 Manish Mandlik 2021-12-16 728 if (!evt_prefix)
145373cb1b1fcdb Miao-chen Chou 2020-04-03 729 return;
145373cb1b1fcdb Miao-chen Chou 2020-04-03 730
e5af6a85decc8c1 Manish Mandlik 2021-12-16 731 if (memcmp(evt_prefix, msft->evt_prefix, msft->evt_prefix_len))
145373cb1b1fcdb Miao-chen Chou 2020-04-03 732 return;
145373cb1b1fcdb Miao-chen Chou 2020-04-03 733 }
145373cb1b1fcdb Miao-chen Chou 2020-04-03 734
145373cb1b1fcdb Miao-chen Chou 2020-04-03 735 /* Every event starts at least with an event code and the rest of
145373cb1b1fcdb Miao-chen Chou 2020-04-03 736 * the data is variable and depends on the event code.
145373cb1b1fcdb Miao-chen Chou 2020-04-03 737 */
145373cb1b1fcdb Miao-chen Chou 2020-04-03 738 if (skb->len < 1)
145373cb1b1fcdb Miao-chen Chou 2020-04-03 739 return;
145373cb1b1fcdb Miao-chen Chou 2020-04-03 740
e5af6a85decc8c1 Manish Mandlik 2021-12-16 741 hci_dev_lock(hdev);
145373cb1b1fcdb Miao-chen Chou 2020-04-03 742
e5af6a85decc8c1 Manish Mandlik 2021-12-16 743 evt = msft_skb_pull(hdev, skb, 0, sizeof(*evt));
e5af6a85decc8c1 Manish Mandlik 2021-12-16 744 if (!evt)
e5af6a85decc8c1 Manish Mandlik 2021-12-16 745 return;
Missing hci_dev_unlock(hdev);
e5af6a85decc8c1 Manish Mandlik 2021-12-16 746
e5af6a85decc8c1 Manish Mandlik 2021-12-16 747 switch (*evt) {
e5af6a85decc8c1 Manish Mandlik 2021-12-16 748 case MSFT_EV_LE_MONITOR_DEVICE:
e5af6a85decc8c1 Manish Mandlik 2021-12-16 749 msft_monitor_device_evt(hdev, skb);
e5af6a85decc8c1 Manish Mandlik 2021-12-16 750 break;
e5af6a85decc8c1 Manish Mandlik 2021-12-16 751
e5af6a85decc8c1 Manish Mandlik 2021-12-16 752 default:
e5af6a85decc8c1 Manish Mandlik 2021-12-16 753 bt_dev_dbg(hdev, "MSFT vendor event 0x%02x", *evt);
e5af6a85decc8c1 Manish Mandlik 2021-12-16 754 break;
e5af6a85decc8c1 Manish Mandlik 2021-12-16 755 }
e5af6a85decc8c1 Manish Mandlik 2021-12-16 756
e5af6a85decc8c1 Manish Mandlik 2021-12-16 @757 hci_dev_unlock(hdev);
145373cb1b1fcdb Miao-chen Chou 2020-04-03 758 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
next prev parent reply other threads:[~2021-12-17 7:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 12:49 [PATCH v9 1/3] bluetooth: msft: Handle MSFT Monitor Device Event Manish Mandlik
2021-12-16 12:49 ` [PATCH v9 2/3] bluetooth: mgmt: Add MGMT Adv Monitor Device Found/Lost events Manish Mandlik
2021-12-16 12:49 ` [PATCH v9 3/3] bluetooth: mgmt: Fix sizeof in mgmt_device_found() Manish Mandlik
2021-12-16 19:49 ` Luiz Augusto von Dentz
2021-12-16 19:35 ` [PATCH v9 1/3] bluetooth: msft: Handle MSFT Monitor Device Event Luiz Augusto von Dentz
2021-12-17 7:17 ` Dan Carpenter [this message]
2021-12-21 21:56 ` [kbuild] " Luiz Augusto von Dentz
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=202112171439.KaggScQN-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=johan.hedberg@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=mcchou@google.com \
--cc=mmandlik@google.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).