All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition
@ 2022-07-22 11:15 Zijun Hu
  2022-07-22 12:01 ` [v5] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zijun Hu @ 2022-07-22 11:15 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni,
	luiz.von.dentz, quic_zijuhu
  Cc: linux-kernel, linux-bluetooth, netdev

both hci_request.c and hci_sync.c have the same definition for
disconnected_accept_list_entries(), so remove a redundant copy.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
v4->v5
 -move the func declaration from hci_request.h to hci_request.c
v2->v4
 -optimize commit message
v1->v2
 -remove the func copy within hci_request.c instead of hci_sync.c
 net/bluetooth/hci_request.c | 20 ++------------------
 net/bluetooth/hci_sync.c    |  2 +-
 2 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 635cc5fb451e..69e30217c4e4 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -32,6 +32,8 @@
 #include "msft.h"
 #include "eir.h"
 
+extern bool disconnected_accept_list_entries(struct hci_dev *hdev);
+
 void hci_req_init(struct hci_request *req, struct hci_dev *hdev)
 {
 	skb_queue_head_init(&req->cmd_q);
@@ -1784,24 +1786,6 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy,
 	return 0;
 }
 
-static bool disconnected_accept_list_entries(struct hci_dev *hdev)
-{
-	struct bdaddr_list *b;
-
-	list_for_each_entry(b, &hdev->accept_list, list) {
-		struct hci_conn *conn;
-
-		conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &b->bdaddr);
-		if (!conn)
-			return true;
-
-		if (conn->state != BT_CONNECTED && conn->state != BT_CONFIG)
-			return true;
-	}
-
-	return false;
-}
-
 void __hci_req_update_scan(struct hci_request *req)
 {
 	struct hci_dev *hdev = req->hdev;
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 3067d94e7a8e..b44d0b4143e6 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2425,7 +2425,7 @@ int hci_write_fast_connectable_sync(struct hci_dev *hdev, bool enable)
 	return err;
 }
 
-static bool disconnected_accept_list_entries(struct hci_dev *hdev)
+bool disconnected_accept_list_entries(struct hci_dev *hdev)
 {
 	struct bdaddr_list *b;
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [v5] Bluetooth: hci_sync: Remove redundant func definition
  2022-07-22 11:15 [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
@ 2022-07-22 12:01 ` bluez.test.bot
  2022-08-14 12:18 ` [PATCH v5] " kernel test robot
  2022-08-14 12:18 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2022-07-22 12:01 UTC (permalink / raw)
  To: linux-bluetooth, quic_zijuhu

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=662214

---Test result---

Test Summary:
CheckPatch                    PASS      2.01 seconds
GitLint                       PASS      1.07 seconds
SubjectPrefix                 PASS      0.91 seconds
BuildKernel                   PASS      35.23 seconds
BuildKernel32                 PASS      31.05 seconds
Incremental Build with patchesPASS      49.16 seconds
TestRunner: Setup             PASS      535.85 seconds
TestRunner: l2cap-tester      PASS      17.28 seconds
TestRunner: bnep-tester       PASS      6.05 seconds
TestRunner: mgmt-tester       PASS      101.05 seconds
TestRunner: rfcomm-tester     PASS      9.41 seconds
TestRunner: sco-tester        PASS      9.45 seconds
TestRunner: smp-tester        PASS      9.24 seconds
TestRunner: userchan-tester   PASS      6.07 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition
  2022-07-22 11:15 [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
  2022-07-22 12:01 ` [v5] " bluez.test.bot
@ 2022-08-14 12:18 ` kernel test robot
  2022-08-14 12:18 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-08-14 12:18 UTC (permalink / raw)
  To: Zijun Hu, marcel, johan.hedberg, luiz.dentz, davem, edumazet,
	kuba, pabeni, luiz.von.dentz
  Cc: kbuild-all, linux-kernel, linux-bluetooth, netdev

Hi Zijun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth/master]
[also build test WARNING on net-next/master net/master linus/master v5.19]
[cannot apply to bluetooth-next/master next-20220812]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zijun-Hu/Bluetooth-hci_sync-Remove-redundant-func-definition/20220722-191804
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220814/202208142029.Y9YOiT4V-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/01ff3d2230c220a1387940ed594eccda09dc51fb
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Zijun-Hu/Bluetooth-hci_sync-Remove-redundant-func-definition/20220722-191804
        git checkout 01ff3d2230c220a1387940ed594eccda09dc51fb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/bluetooth/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> net/bluetooth/hci_sync.c:2398:6: warning: no previous prototype for 'disconnected_accept_list_entries' [-Wmissing-prototypes]
    2398 | bool disconnected_accept_list_entries(struct hci_dev *hdev)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/disconnected_accept_list_entries +2398 net/bluetooth/hci_sync.c

  2397	
> 2398	bool disconnected_accept_list_entries(struct hci_dev *hdev)
  2399	{
  2400		struct bdaddr_list *b;
  2401	
  2402		list_for_each_entry(b, &hdev->accept_list, list) {
  2403			struct hci_conn *conn;
  2404	
  2405			conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &b->bdaddr);
  2406			if (!conn)
  2407				return true;
  2408	
  2409			if (conn->state != BT_CONNECTED && conn->state != BT_CONFIG)
  2410				return true;
  2411		}
  2412	
  2413		return false;
  2414	}
  2415	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition
  2022-07-22 11:15 [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
  2022-07-22 12:01 ` [v5] " bluez.test.bot
  2022-08-14 12:18 ` [PATCH v5] " kernel test robot
@ 2022-08-14 12:18 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-08-14 12:18 UTC (permalink / raw)
  To: Zijun Hu, marcel, johan.hedberg, luiz.dentz, davem, edumazet,
	kuba, pabeni, luiz.von.dentz
  Cc: kbuild-all, linux-kernel, linux-bluetooth, netdev

Hi Zijun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth/master]
[also build test WARNING on net-next/master net/master linus/master v5.19]
[cannot apply to bluetooth-next/master next-20220812]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zijun-Hu/Bluetooth-hci_sync-Remove-redundant-func-definition/20220722-191804
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: arm-defconfig (https://download.01.org/0day-ci/archive/20220814/202208142033.Kav1wBRp-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/01ff3d2230c220a1387940ed594eccda09dc51fb
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Zijun-Hu/Bluetooth-hci_sync-Remove-redundant-func-definition/20220722-191804
        git checkout 01ff3d2230c220a1387940ed594eccda09dc51fb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/bluetooth/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> net/bluetooth/hci_sync.c:2398:6: warning: no previous prototype for 'disconnected_accept_list_entries' [-Wmissing-prototypes]
    2398 | bool disconnected_accept_list_entries(struct hci_dev *hdev)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/disconnected_accept_list_entries +2398 net/bluetooth/hci_sync.c

  2397	
> 2398	bool disconnected_accept_list_entries(struct hci_dev *hdev)
  2399	{
  2400		struct bdaddr_list *b;
  2401	
  2402		list_for_each_entry(b, &hdev->accept_list, list) {
  2403			struct hci_conn *conn;
  2404	
  2405			conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &b->bdaddr);
  2406			if (!conn)
  2407				return true;
  2408	
  2409			if (conn->state != BT_CONNECTED && conn->state != BT_CONFIG)
  2410				return true;
  2411		}
  2412	
  2413		return false;
  2414	}
  2415	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-14 12:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 11:15 [PATCH v5] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
2022-07-22 12:01 ` [v5] " bluez.test.bot
2022-08-14 12:18 ` [PATCH v5] " kernel test robot
2022-08-14 12:18 ` kernel test robot

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.