Message ID | 1657871102-26907-1-git-send-email-quic_zijuhu@quicinc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v4] Bluetooth: hci_sync: Remove redundant func definition | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
tedd_an/subjectprefix | success | PASS |
tedd_an/buildkernel | success | Build Kernel PASS |
tedd_an/buildkernel32 | success | Build Kernel32 PASS |
tedd_an/incremental_build | success | Pass |
tedd_an/testrunnersetup | success | Test Runner Setup PASS |
tedd_an/testrunnerl2cap-tester | success | Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerbnep-tester | success | Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnermgmt-tester | success | Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerrfcomm-tester | success | Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersco-tester | success | Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersmp-tester | success | Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunneruserchan-tester | success | Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0 |
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=659977 ---Test result--- Test Summary: CheckPatch PASS 2.14 seconds GitLint PASS 1.00 seconds SubjectPrefix PASS 0.87 seconds BuildKernel PASS 32.11 seconds BuildKernel32 PASS 28.11 seconds Incremental Build with patchesPASS 38.59 seconds TestRunner: Setup PASS 480.85 seconds TestRunner: l2cap-tester PASS 17.33 seconds TestRunner: bnep-tester PASS 6.09 seconds TestRunner: mgmt-tester PASS 98.87 seconds TestRunner: rfcomm-tester PASS 9.63 seconds TestRunner: sco-tester PASS 9.40 seconds TestRunner: smp-tester PASS 9.34 seconds TestRunner: userchan-tester PASS 6.30 seconds --- Regards, Linux Bluetooth
Hi Zijun, On Fri, Jul 15, 2022 at 12:45 AM Zijun Hu <quic_zijuhu@quicinc.com> wrote: > > 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> > --- > v3->v4 > -use 75 characters per line for Linux commit message bodies > v2->v3 > -remove table char to solve gitlint checking failure > v1->v2 > -remove the func copy within hci_request.c instead of hci_sync.c > net/bluetooth/hci_request.c | 18 ------------------ > net/bluetooth/hci_request.h | 2 ++ > net/bluetooth/hci_sync.c | 2 +- > 3 files changed, 3 insertions(+), 19 deletions(-) > > diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c > index 635cc5fb451e..edec0447aaa7 100644 > --- a/net/bluetooth/hci_request.c > +++ b/net/bluetooth/hci_request.c > @@ -1784,24 +1784,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_request.h b/net/bluetooth/hci_request.h > index 7f8df258e295..e80b500878d9 100644 > --- a/net/bluetooth/hci_request.h > +++ b/net/bluetooth/hci_request.h > @@ -120,6 +120,8 @@ void __hci_req_update_scan(struct hci_request *req); > int hci_update_random_address(struct hci_request *req, bool require_privacy, > bool use_rpa, u8 *own_addr_type); > > +bool disconnected_accept_list_entries(struct hci_dev *hdev); I rather not add anything to hci_request.h since we want to deprecate its functions, in fact we might as well try to start removing the code paths that attempt to access things like disconnected_accept_list_entries since I think most of the code is already in place in hci_sync.c things like __hci_req_update_scan if it is no longer used anywhere else. > int hci_abort_conn(struct hci_conn *conn, u8 reason); > void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn, > u8 reason); > diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c > index 212b0cdb25f5..48a262f0ae49 100644 > --- a/net/bluetooth/hci_sync.c > +++ b/net/bluetooth/hci_sync.c > @@ -2419,7 +2419,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 >
On 7/19/2022 7:12 AM, Luiz Augusto von Dentz wrote: > Hi Zijun, > > On Fri, Jul 15, 2022 at 12:45 AM Zijun Hu <quic_zijuhu@quicinc.com> wrote: >> >> 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> >> --- >> v3->v4 >> -use 75 characters per line for Linux commit message bodies >> v2->v3 >> -remove table char to solve gitlint checking failure >> v1->v2 >> -remove the func copy within hci_request.c instead of hci_sync.c >> net/bluetooth/hci_request.c | 18 ------------------ >> net/bluetooth/hci_request.h | 2 ++ >> net/bluetooth/hci_sync.c | 2 +- >> 3 files changed, 3 insertions(+), 19 deletions(-) >> >> diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c >> index 635cc5fb451e..edec0447aaa7 100644 >> --- a/net/bluetooth/hci_request.c >> +++ b/net/bluetooth/hci_request.c >> @@ -1784,24 +1784,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_request.h b/net/bluetooth/hci_request.h >> index 7f8df258e295..e80b500878d9 100644 >> --- a/net/bluetooth/hci_request.h >> +++ b/net/bluetooth/hci_request.h >> @@ -120,6 +120,8 @@ void __hci_req_update_scan(struct hci_request *req); >> int hci_update_random_address(struct hci_request *req, bool require_privacy, >> bool use_rpa, u8 *own_addr_type); >> >> +bool disconnected_accept_list_entries(struct hci_dev *hdev); > > I rather not add anything to hci_request.h since we want to deprecate > its functions, in fact we might as well try to start removing the code > paths that attempt to access things like > disconnected_accept_list_entries since I think most of the code is > already in place in hci_sync.c things like __hci_req_update_scan if it > is no longer used anywhere else. > so A: move extern disconnected_accept_list_entries() from hci_request.h to hci_request.c B: discard this change what is your suggestion? A or B >> int hci_abort_conn(struct hci_conn *conn, u8 reason); >> void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn, >> u8 reason); >> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c >> index 212b0cdb25f5..48a262f0ae49 100644 >> --- a/net/bluetooth/hci_sync.c >> +++ b/net/bluetooth/hci_sync.c >> @@ -2419,7 +2419,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 >> > >
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 635cc5fb451e..edec0447aaa7 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -1784,24 +1784,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_request.h b/net/bluetooth/hci_request.h index 7f8df258e295..e80b500878d9 100644 --- a/net/bluetooth/hci_request.h +++ b/net/bluetooth/hci_request.h @@ -120,6 +120,8 @@ void __hci_req_update_scan(struct hci_request *req); int hci_update_random_address(struct hci_request *req, bool require_privacy, bool use_rpa, u8 *own_addr_type); +bool disconnected_accept_list_entries(struct hci_dev *hdev); + int hci_abort_conn(struct hci_conn *conn, u8 reason); void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn, u8 reason); diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 212b0cdb25f5..48a262f0ae49 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -2419,7 +2419,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;
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> --- v3->v4 -use 75 characters per line for Linux commit message bodies v2->v3 -remove table char to solve gitlint checking failure v1->v2 -remove the func copy within hci_request.c instead of hci_sync.c net/bluetooth/hci_request.c | 18 ------------------ net/bluetooth/hci_request.h | 2 ++ net/bluetooth/hci_sync.c | 2 +- 3 files changed, 3 insertions(+), 19 deletions(-)