linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: hci_sync: Remove redundant func definition
@ 2022-07-15  4:14 Zijun Hu
  2022-07-15  5:14 ` [v2] " bluez.test.bot
  2022-07-15  7:34 ` [PATCH v2] " Paul Menzel
  0 siblings, 2 replies; 4+ messages in thread
From: Zijun Hu @ 2022-07-15  4:14 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni,
	luiz.von.dentz, quic_zijuhu
  Cc: linux-kernel, linux-bluetooth, linux-arm-msm, 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>
---
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);
+
 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


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

* RE: [v2] Bluetooth: hci_sync: Remove redundant func definition
  2022-07-15  4:14 [PATCH v2] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
@ 2022-07-15  5:14 ` bluez.test.bot
  2022-07-15  7:34 ` [PATCH v2] " Paul Menzel
  1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2022-07-15  5:14 UTC (permalink / raw)
  To: linux-bluetooth, quic_zijuhu

[-- Attachment #1: Type: text/plain, Size: 1385 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=659926

---Test result---

Test Summary:
CheckPatch                    PASS      1.35 seconds
GitLint                       FAIL      0.44 seconds
SubjectPrefix                 PASS      0.29 seconds
BuildKernel                   PASS      42.89 seconds
BuildKernel32                 PASS      37.83 seconds
Incremental Build with patchesPASS      51.07 seconds
TestRunner: Setup             PASS      626.68 seconds
TestRunner: l2cap-tester      PASS      20.21 seconds
TestRunner: bnep-tester       PASS      7.33 seconds
TestRunner: mgmt-tester       PASS      121.69 seconds
TestRunner: rfcomm-tester     PASS      11.54 seconds
TestRunner: sco-tester        PASS      11.26 seconds
TestRunner: smp-tester        PASS      11.09 seconds
TestRunner: userchan-tester   PASS      7.69 seconds

Details
##############################
Test: GitLint - FAIL - 0.44 seconds
Run gitlint with rule in .gitlint
[v2] Bluetooth: hci_sync: Remove redundant func definition
10: B3 Line contains hard tab characters (\t): "	-remove the func copy within hci_request.c instead of hci_sync.c"




---
Regards,
Linux Bluetooth


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

* Re: [PATCH v2] Bluetooth: hci_sync: Remove redundant func definition
  2022-07-15  4:14 [PATCH v2] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
  2022-07-15  5:14 ` [v2] " bluez.test.bot
@ 2022-07-15  7:34 ` Paul Menzel
  2022-07-15  7:47   ` quic_zijuhu
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2022-07-15  7:34 UTC (permalink / raw)
  To: Zijun Hu
  Cc: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni,
	luiz.von.dentz, linux-kernel, linux-bluetooth, linux-arm-msm,
	netdev

Dear Zijun,


Thank you for the patch.

Am 15.07.22 um 06:14 schrieb Zijun Hu:
> both hci_request.c and hci_sync.c have the same definition
> for disconnected_accept_list_entries(), so remove a redundant
> copy.

Please use 75 characters per line for Linux commit message bodies. That 
way, only two instead of three lines are needed.
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---
> 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(-)

[…]


Kind regards,

Paul

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

* Re: [PATCH v2] Bluetooth: hci_sync: Remove redundant func definition
  2022-07-15  7:34 ` [PATCH v2] " Paul Menzel
@ 2022-07-15  7:47   ` quic_zijuhu
  0 siblings, 0 replies; 4+ messages in thread
From: quic_zijuhu @ 2022-07-15  7:47 UTC (permalink / raw)
  To: Paul Menzel
  Cc: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni,
	luiz.von.dentz, linux-kernel, linux-bluetooth, linux-arm-msm,
	netdev

On 7/15/2022 3:34 PM, Paul Menzel wrote:
> Dear Zijun,
> 
> 
> Thank you for the patch.
> 
> Am 15.07.22 um 06:14 schrieb Zijun Hu:
>> both hci_request.c and hci_sync.c have the same definition
>> for disconnected_accept_list_entries(), so remove a redundant
>> copy.
> 
> Please use 75 characters per line for Linux commit message bodies. That way, only two instead of three lines are needed.
thanks for your suggestion, correct within v4 sent. could you code review again?
>> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
>> ---
>> 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(-)
> 
> […]
> 
> 
> Kind regards,
> 
> Paul


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

end of thread, other threads:[~2022-07-15  7:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15  4:14 [PATCH v2] Bluetooth: hci_sync: Remove redundant func definition Zijun Hu
2022-07-15  5:14 ` [v2] " bluez.test.bot
2022-07-15  7:34 ` [PATCH v2] " Paul Menzel
2022-07-15  7:47   ` quic_zijuhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).