diff mbox series

[1/1] Bluetooth: hci_uart: check for missing tty operations

Message ID 20220407042623.28438-1-ruc_gongyuanjun@163.com
State New
Headers show
Series [1/1] Bluetooth: hci_uart: check for missing tty operations | expand

Commit Message

Yuanjun Gong April 7, 2022, 4:26 a.m. UTC
From: Gong Yuanjun <ruc_gongyuanjun@163.com>

Add a check to the missing tty operations in hci_ag6xx,
hci_h4, hci_ll following the implementations in hci_ath.

Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
---
 drivers/bluetooth/hci_ag6xx.c | 3 +++
 drivers/bluetooth/hci_h4.c    | 3 +++
 drivers/bluetooth/hci_ll.c    | 3 +++
 3 files changed, 9 insertions(+)

Comments

bluez.test.bot@gmail.com April 7, 2022, 5:12 a.m. UTC | #1
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=629800

---Test result---

Test Summary:
CheckPatch                    FAIL      1.93 seconds
GitLint                       PASS      0.95 seconds
SubjectPrefix                 PASS      0.86 seconds
BuildKernel                   PASS      31.00 seconds
BuildKernel32                 PASS      27.28 seconds
Incremental Build with patchesPASS      37.94 seconds
TestRunner: Setup             PASS      477.97 seconds
TestRunner: l2cap-tester      PASS      15.85 seconds
TestRunner: bnep-tester       PASS      6.11 seconds
TestRunner: mgmt-tester       PASS      102.09 seconds
TestRunner: rfcomm-tester     PASS      7.70 seconds
TestRunner: sco-tester        PASS      7.64 seconds
TestRunner: smp-tester        PASS      7.56 seconds
TestRunner: userchan-tester   PASS      6.21 seconds

Details
##############################
Test: CheckPatch - FAIL - 1.93 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
[1/1] Bluetooth: hci_uart: check for missing tty operations\ERROR:CODE_INDENT: code indent should use tabs where possible
#76: FILE: drivers/bluetooth/hci_ag6xx.c:39:
+        if (!hci_uart_has_flow_control(hu))$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#76: FILE: drivers/bluetooth/hci_ag6xx.c:39:
+        if (!hci_uart_has_flow_control(hu))$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#76: FILE: drivers/bluetooth/hci_ag6xx.c:39:
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;

ERROR:CODE_INDENT: code indent should use tabs where possible
#77: FILE: drivers/bluetooth/hci_ag6xx.c:40:
+            return -EOPNOTSUPP;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#77: FILE: drivers/bluetooth/hci_ag6xx.c:40:
+            return -EOPNOTSUPP;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#90: FILE: drivers/bluetooth/hci_h4.c:47:
+        if (!hci_uart_has_flow_control(hu))$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#90: FILE: drivers/bluetooth/hci_h4.c:47:
+        if (!hci_uart_has_flow_control(hu))$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#90: FILE: drivers/bluetooth/hci_h4.c:47:
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;

ERROR:CODE_INDENT: code indent should use tabs where possible
#91: FILE: drivers/bluetooth/hci_h4.c:48:
+            return -EOPNOTSUPP;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#91: FILE: drivers/bluetooth/hci_h4.c:48:
+            return -EOPNOTSUPP;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#104: FILE: drivers/bluetooth/hci_ll.c:117:
+        if (!hci_uart_has_flow_control(hu))$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#104: FILE: drivers/bluetooth/hci_ll.c:117:
+        if (!hci_uart_has_flow_control(hu))$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#104: FILE: drivers/bluetooth/hci_ll.c:117:
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;

ERROR:CODE_INDENT: code indent should use tabs where possible
#105: FILE: drivers/bluetooth/hci_ll.c:118:
+            return -EOPNOTSUPP;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#105: FILE: drivers/bluetooth/hci_ll.c:118:
+            return -EOPNOTSUPP;$

total: 6 errors, 9 warnings, 27 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

/github/workspace/src/12804440.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_ag6xx.c b/drivers/bluetooth/hci_ag6xx.c
index 2d40302409ff..a5f141d43066 100644
--- a/drivers/bluetooth/hci_ag6xx.c
+++ b/drivers/bluetooth/hci_ag6xx.c
@@ -36,6 +36,9 @@  static int ag6xx_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;
+
 	ag6xx = kzalloc(sizeof(*ag6xx), GFP_KERNEL);
 	if (!ag6xx)
 		return -ENOMEM;
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 1d0cdf023243..0ceabe340351 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -44,6 +44,9 @@  static int h4_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;
+
 	h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
 	if (!h4)
 		return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 4eb420a9ed04..22166df1467f 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -114,6 +114,9 @@  static int ll_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;
+
 	ll = kzalloc(sizeof(*ll), GFP_KERNEL);
 	if (!ll)
 		return -ENOMEM;