CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Luiz Augusto von Dentz <[email protected]>
TO: [email protected]

Hi Luiz,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20210621]
[cannot apply to bluetooth/master v5.13-rc7]
[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/Luiz-Augusto-von-Dentz/Bluetooth-Add-helper-for-serialized-HCI-command-execution/20210622-084255
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git 
master
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: i386-randconfig-m021-20210622 (attached as .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]>

New smatch warnings:
net/bluetooth/hci_sync.c:1269 hci_resume_advertising_sync() error: 
uninitialized symbol 'err'.

Old smatch warnings:
net/bluetooth/hci_sync.c:91 __hci_cmd_sync_status() warn: passing zero to 
'PTR_ERR'
net/bluetooth/hci_sync.c:93 __hci_cmd_sync_status() warn: passing zero to 
'PTR_ERR'

vim +/err +1269 net/bluetooth/hci_sync.c

a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1227  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1228  /* This function 
disables all user advertising instances (excluding 0x00) */
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1229  static int 
hci_resume_advertising_sync(struct hci_dev *hdev)
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1230  {
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1231          struct adv_info 
*adv, *tmp;
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1232          int err;
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1233  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1234          /* If 
advertising has not been paused there is nothing  to do. */
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1235          if 
(!hdev->advertising_paused)
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1236                  return 
0;
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1237  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1238          
bt_dev_dbg(hdev, "Resuming advertising instances");
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1239  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1240          if 
(ext_adv_capable(hdev)) {
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1241                  /* Call 
for each tracked instance to be re-enabled */
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1242                  
list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list) {
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1243                          
err = hci_enable_ext_advertising_sync(hdev,
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1244                          
                                      adv->instance);
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1245                          
if (!err)
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1246                          
        continue;
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1247  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1248  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1249                          
/* If the instance cannot be resumed remove it */
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1250                          
err = hci_remove_ext_adv_instance_sync(hdev,
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1251                          
                                       adv->instance);
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1252                          
if (!err) {
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1253                          
        mgmt_advertising_removed(NULL, hdev,
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1254                          
                                 adv->instance);
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1255                          
        hci_remove_adv_instance(hdev, adv->instance);
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1256                          
}
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1257                  }
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1258          } else {
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1259                  /* 
Schedule for most recent instance to be restarted and begin
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1260                   * the 
software rotation loop
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1261                   */
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1262                  err = 
hci_schedule_adv_instance_sync(hdev,
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1263                          
                             hdev->cur_adv_instance,
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1264                          
                             true);
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1265          }
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1266  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1267          
hdev->advertising_paused = false;
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21  1268  
a3c94615598e4f Luiz Augusto von Dentz 2021-06-21 @1269          return err;
7dd94f82cedd58 Luiz Augusto von Dentz 2021-06-21  1270  }
7dd94f82cedd58 Luiz Augusto von Dentz 2021-06-21  1271  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to