From: kernel test robot <lkp@intel.com> To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com> Subject: [linux-next:master 13863/14003] net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' Date: Sat, 25 Feb 2023 19:45:23 +0800 [thread overview] Message-ID: <202302251952.xryXOegd-lkp@intel.com> (raw) BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: Linux Memory Management List <linux-mm@kvack.org> TO: Zhengping Jiang <jiangzp@google.com> CC: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 8232539f864ca60474e38eb42d451f5c26415856 commit: 2b291083eb0c49cd1633cddf95cc0e6e7303e43b [13863/14003] Bluetooth: hci_sync: Resume adv with no RPA when active scan :::::: branch date: 8 hours ago :::::: commit date: 15 hours ago config: parisc-randconfig-m031-20230223 (https://download.01.org/0day-ci/archive/20230225/202302251952.xryXOegd-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Reported-by: Dan Carpenter <error27@gmail.com> | Link: https://lore.kernel.org/r/202302251952.xryXOegd-lkp@intel.com/ New smatch warnings: net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' Old smatch warnings: net/bluetooth/hci_sync.c:2367 hci_resume_advertising_sync() error: uninitialized symbol 'err'. vim +/err +2403 net/bluetooth/hci_sync.c e8907f76544ffe Luiz Augusto von Dentz 2021-10-27 2369 2b291083eb0c49 Zhengping Jiang 2023-02-21 2370 static int hci_pause_addr_resolution(struct hci_dev *hdev) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2371 { 2b291083eb0c49 Zhengping Jiang 2023-02-21 2372 int err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2373 2b291083eb0c49 Zhengping Jiang 2023-02-21 2374 if (!use_ll_privacy(hdev)) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2375 return 0; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2376 2b291083eb0c49 Zhengping Jiang 2023-02-21 2377 if (!hci_dev_test_flag(hdev, HCI_LL_RPA_RESOLUTION)) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2378 return 0; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2379 2b291083eb0c49 Zhengping Jiang 2023-02-21 2380 /* Cannot disable addr resolution if scanning is enabled or 2b291083eb0c49 Zhengping Jiang 2023-02-21 2381 * when initiating an LE connection. 2b291083eb0c49 Zhengping Jiang 2023-02-21 2382 */ 2b291083eb0c49 Zhengping Jiang 2023-02-21 2383 if (hci_dev_test_flag(hdev, HCI_LE_SCAN) || 2b291083eb0c49 Zhengping Jiang 2023-02-21 2384 hci_lookup_le_connect(hdev)) { 2b291083eb0c49 Zhengping Jiang 2023-02-21 2385 bt_dev_err(hdev, "Command not allowed when scan/LE connect"); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2386 return -EPERM; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2387 } 2b291083eb0c49 Zhengping Jiang 2023-02-21 2388 2b291083eb0c49 Zhengping Jiang 2023-02-21 2389 /* Cannot disable addr resolution if advertising is enabled. */ 2b291083eb0c49 Zhengping Jiang 2023-02-21 2390 err = hci_pause_advertising_sync(hdev); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2391 if (err) { 2b291083eb0c49 Zhengping Jiang 2023-02-21 2392 bt_dev_err(hdev, "Pause advertising failed: %d", err); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2393 return err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2394 } 2b291083eb0c49 Zhengping Jiang 2023-02-21 2395 2b291083eb0c49 Zhengping Jiang 2023-02-21 2396 err = hci_le_set_addr_resolution_enable_sync(hdev, 0x00); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2397 if (err) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2398 bt_dev_err(hdev, "Unable to disable Address Resolution: %d", 2b291083eb0c49 Zhengping Jiang 2023-02-21 2399 err); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2400 2b291083eb0c49 Zhengping Jiang 2023-02-21 2401 /* Return if address resolution is disabled and RPA is not used. */ 2b291083eb0c49 Zhengping Jiang 2023-02-21 2402 if (!err && scan_use_rpa(hdev)) 2b291083eb0c49 Zhengping Jiang 2023-02-21 @2403 return err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2404 2b291083eb0c49 Zhengping Jiang 2023-02-21 2405 hci_resume_advertising_sync(hdev); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2406 return err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2407 } 2b291083eb0c49 Zhengping Jiang 2023-02-21 2408 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com> To: oe-kbuild@lists.linux.dev, Zhengping Jiang <jiangzp@google.com> Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Subject: [linux-next:master 13863/14003] net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' Date: Mon, 27 Feb 2023 07:21:15 +0300 [thread overview] Message-ID: <202302251952.xryXOegd-lkp@intel.com> (raw) Message-ID: <20230227042115.Rh4vG-fX9-VMZYf68YnoePgmZgw1XduowqL-YzddwTM@z> (raw) tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 8232539f864ca60474e38eb42d451f5c26415856 commit: 2b291083eb0c49cd1633cddf95cc0e6e7303e43b [13863/14003] Bluetooth: hci_sync: Resume adv with no RPA when active scan config: parisc-randconfig-m031-20230223 (https://download.01.org/0day-ci/archive/20230225/202302251952.xryXOegd-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Reported-by: Dan Carpenter <error27@gmail.com> | Link: https://lore.kernel.org/r/202302251952.xryXOegd-lkp@intel.com/ New smatch warnings: net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' vim +/err +2403 net/bluetooth/hci_sync.c 2b291083eb0c49 Zhengping Jiang 2023-02-21 2370 static int hci_pause_addr_resolution(struct hci_dev *hdev) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2371 { 2b291083eb0c49 Zhengping Jiang 2023-02-21 2372 int err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2373 2b291083eb0c49 Zhengping Jiang 2023-02-21 2374 if (!use_ll_privacy(hdev)) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2375 return 0; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2376 2b291083eb0c49 Zhengping Jiang 2023-02-21 2377 if (!hci_dev_test_flag(hdev, HCI_LL_RPA_RESOLUTION)) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2378 return 0; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2379 2b291083eb0c49 Zhengping Jiang 2023-02-21 2380 /* Cannot disable addr resolution if scanning is enabled or 2b291083eb0c49 Zhengping Jiang 2023-02-21 2381 * when initiating an LE connection. 2b291083eb0c49 Zhengping Jiang 2023-02-21 2382 */ 2b291083eb0c49 Zhengping Jiang 2023-02-21 2383 if (hci_dev_test_flag(hdev, HCI_LE_SCAN) || 2b291083eb0c49 Zhengping Jiang 2023-02-21 2384 hci_lookup_le_connect(hdev)) { 2b291083eb0c49 Zhengping Jiang 2023-02-21 2385 bt_dev_err(hdev, "Command not allowed when scan/LE connect"); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2386 return -EPERM; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2387 } 2b291083eb0c49 Zhengping Jiang 2023-02-21 2388 2b291083eb0c49 Zhengping Jiang 2023-02-21 2389 /* Cannot disable addr resolution if advertising is enabled. */ 2b291083eb0c49 Zhengping Jiang 2023-02-21 2390 err = hci_pause_advertising_sync(hdev); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2391 if (err) { 2b291083eb0c49 Zhengping Jiang 2023-02-21 2392 bt_dev_err(hdev, "Pause advertising failed: %d", err); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2393 return err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2394 } 2b291083eb0c49 Zhengping Jiang 2023-02-21 2395 2b291083eb0c49 Zhengping Jiang 2023-02-21 2396 err = hci_le_set_addr_resolution_enable_sync(hdev, 0x00); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2397 if (err) 2b291083eb0c49 Zhengping Jiang 2023-02-21 2398 bt_dev_err(hdev, "Unable to disable Address Resolution: %d", 2b291083eb0c49 Zhengping Jiang 2023-02-21 2399 err); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2400 2b291083eb0c49 Zhengping Jiang 2023-02-21 2401 /* Return if address resolution is disabled and RPA is not used. */ 2b291083eb0c49 Zhengping Jiang 2023-02-21 2402 if (!err && scan_use_rpa(hdev)) 2b291083eb0c49 Zhengping Jiang 2023-02-21 @2403 return err; This is correct, but change it to "return 0;" for readability. 2b291083eb0c49 Zhengping Jiang 2023-02-21 2404 2b291083eb0c49 Zhengping Jiang 2023-02-21 2405 hci_resume_advertising_sync(hdev); 2b291083eb0c49 Zhengping Jiang 2023-02-21 2406 return err; 2b291083eb0c49 Zhengping Jiang 2023-02-21 2407 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests
next reply other threads:[~2023-02-25 11:45 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-25 11:45 kernel test robot [this message] 2023-02-27 4:21 ` [linux-next:master 13863/14003] net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' Dan Carpenter
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=202302251952.xryXOegd-lkp@intel.com \ --to=lkp@intel.com \ --cc=error27@gmail.com \ --cc=oe-kbuild@lists.linux.dev \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.