CC: [email protected]
In-Reply-To: 
<20211216044839.v9.1.Ic0a40b84dee3825302890aaea690e73165c71820@changeid>
References: 
<20211216044839.v9.1.Ic0a40b84dee3825302890aaea690e73165c71820@changeid>
TO: Manish Mandlik <[email protected]>
TO: [email protected]
TO: [email protected]
CC: [email protected]
CC: [email protected]
CC: Manish Mandlik <[email protected]>
CC: "Miao-chen Chou" <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: Johan Hedberg <[email protected]>
CC: [email protected]
CC: [email protected]

Hi Manish,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20211216]
[cannot apply to bluetooth/master v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

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
:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago
config: i386-randconfig-m021-20211216 
(https://download.01.org/0day-ci/archive/20211217/[email protected]/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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
net/bluetooth/msft.c:757 msft_vendor_evt() warn: inconsistent returns 
'&hdev->lock'.

vim +757 net/bluetooth/msft.c

e5af6a85decc8c1 Manish Mandlik         2021-12-16  713  
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;
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  }
e5e1e7fd470ccf2 Miao-chen Chou         2020-06-17  759  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to