diff mbox series

[v2,1/3] serdev: Add method to assert break

Message ID 20230130180504.2029440-2-neeraj.sanjaykale@nxp.com (mailing list archive)
State Superseded
Headers show
Series Add support for NXP bluetooth chipsets | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch warning WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #126: FILE: drivers/tty/serdev/core.c:413: + return -ENOTSUPP; WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #149: FILE: drivers/tty/serdev/serdev-ttyport.c:256: + return -ENOTSUPP; WARNING: function definition argument 'struct serdev_controller *' should also have an identifier name #173: FILE: include/linux/serdev.h:95: + int (*break_ctl)(struct serdev_controller *, unsigned int); WARNING: function definition argument 'unsigned int' should also have an identifier name #173: FILE: include/linux/serdev.h:95: + int (*break_ctl)(struct serdev_controller *, unsigned int); WARNING: function definition argument 'struct serdev_device *' should also have an identifier name #181: FILE: include/linux/serdev.h:206: +int serdev_device_break_ctl(struct serdev_device *, int); WARNING: function definition argument 'int' should also have an identifier name #181: FILE: include/linux/serdev.h:206: +int serdev_device_break_ctl(struct serdev_device *, int); WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #191: FILE: include/linux/serdev.h:262: + return -ENOTSUPP; total: 0 errors, 7 warnings, 65 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. /github/workspace/src/src/13121548.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.
tedd_an/GitLint success Gitlint PASS
tedd_an/SubjectPrefix fail "Bluetooth: " prefix is not specified in the subject
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Neeraj Sanjay Kale Jan. 30, 2023, 6:05 p.m. UTC
Adds serdev_device_break_ctl() and an implementation for ttyport.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
---
 drivers/tty/serdev/core.c           | 11 +++++++++++
 drivers/tty/serdev/serdev-ttyport.c | 12 ++++++++++++
 include/linux/serdev.h              |  6 ++++++
 3 files changed, 29 insertions(+)

Comments

bluez.test.bot@gmail.com Jan. 30, 2023, 6:35 p.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=717061

---Test result---

Test Summary:
CheckPatch                    FAIL      4.92 seconds
GitLint                       FAIL      1.21 seconds
SubjectPrefix                 FAIL      0.57 seconds
BuildKernel                   PASS      32.32 seconds
CheckAllWarning               PASS      34.84 seconds
CheckSparse                   PASS      39.59 seconds
CheckSmatch                   PASS      109.75 seconds
BuildKernel32                 PASS      30.92 seconds
TestRunnerSetup               PASS      432.43 seconds
TestRunner_l2cap-tester       PASS      16.18 seconds
TestRunner_iso-tester         PASS      16.69 seconds
TestRunner_bnep-tester        PASS      5.44 seconds
TestRunner_mgmt-tester        PASS      107.72 seconds
TestRunner_rfcomm-tester      PASS      8.74 seconds
TestRunner_sco-tester         PASS      7.93 seconds
TestRunner_ioctl-tester       PASS      9.32 seconds
TestRunner_mesh-tester        PASS      6.77 seconds
TestRunner_smp-tester         PASS      7.81 seconds
TestRunner_userchan-tester    PASS      5.73 seconds
IncrementalBuild              PASS      36.31 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v2,1/3] serdev: Add method to assert break
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
#126: FILE: drivers/tty/serdev/core.c:413:
+		return -ENOTSUPP;

WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
#149: FILE: drivers/tty/serdev/serdev-ttyport.c:256:
+		return -ENOTSUPP;

WARNING: function definition argument 'struct serdev_controller *' should also have an identifier name
#173: FILE: include/linux/serdev.h:95:
+	int (*break_ctl)(struct serdev_controller *, unsigned int);

WARNING: function definition argument 'unsigned int' should also have an identifier name
#173: FILE: include/linux/serdev.h:95:
+	int (*break_ctl)(struct serdev_controller *, unsigned int);

WARNING: function definition argument 'struct serdev_device *' should also have an identifier name
#181: FILE: include/linux/serdev.h:206:
+int serdev_device_break_ctl(struct serdev_device *, int);

WARNING: function definition argument 'int' should also have an identifier name
#181: FILE: include/linux/serdev.h:206:
+int serdev_device_break_ctl(struct serdev_device *, int);

WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
#191: FILE: include/linux/serdev.h:262:
+	return -ENOTSUPP;

total: 0 errors, 7 warnings, 65 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.

/github/workspace/src/src/13121548.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.


[v2,3/3] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets
WARNING: MAINTAINERS entries use one tab after TYPE:
#171: FILE: MAINTAINERS:22843:
+F:      drivers/bluetooth/btnxpuart*

WARNING: line length of 102 exceeds 100 columns
#257: FILE: drivers/bluetooth/btnxpuart.c:45:
+										u32 plen, void *param)

WARNING: line length of 101 exceeds 100 columns
#656: FILE: drivers/bluetooth/btnxpuart.c:444:
+										(char *)&uart_config,

WARNING: line length of 106 exceeds 100 columns
#657: FILE: drivers/bluetooth/btnxpuart.c:445:
+										sizeof(uart_config) - 4));

WARNING: line length of 103 exceeds 100 columns
#677: FILE: drivers/bluetooth/btnxpuart.c:465:
+										sizeof(nxp_cmd7) - 4));

WARNING: Missing a blank line after declarations
#691: FILE: drivers/bluetooth/btnxpuart.c:479:
+	struct nxp_bootloader_cmd *hdr = (struct nxp_bootloader_cmd *)buf;
+	return __le32_to_cpu(hdr->payload_len);

WARNING: Block comments should align the * on each line
#745: FILE: drivers/bluetooth/btnxpuart.c:533:
+		/* The CRC did not match at the other end.
+		* That's why the request to re-send.

WARNING: Block comments should align the * on each line
#752: FILE: drivers/bluetooth/btnxpuart.c:540:
+		/* The FW bin file is made up of many blocks of
+		* 16 byte header and payload data chunks. If the

WARNING: Block comments should align the * on each line
#763: FILE: drivers/bluetooth/btnxpuart.c:551:
+			/* All OK here. Increment offset by number
+			* of previous successfully sent bytes.

total: 0 errors, 9 warnings, 1401 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.

/github/workspace/src/src/13121550.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.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v2,2/3] dt-bindings: net: bluetooth: Add NXP bluetooth support

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
15: B1 Line exceeds max length (86>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth/nxp-bluetooth.yaml"
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
"Bluetooth: " prefix is not specified in the subject


---
Regards,
Linux Bluetooth
Leon Romanovsky Jan. 31, 2023, 8:57 a.m. UTC | #2
On Mon, Jan 30, 2023 at 11:35:02PM +0530, Neeraj Sanjay Kale wrote:
> Adds serdev_device_break_ctl() and an implementation for ttyport.
> 
> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> ---
>  drivers/tty/serdev/core.c           | 11 +++++++++++
>  drivers/tty/serdev/serdev-ttyport.c | 12 ++++++++++++
>  include/linux/serdev.h              |  6 ++++++
>  3 files changed, 29 insertions(+)

<...>

> +{
> +	struct serport *serport = serdev_controller_get_drvdata(ctrl);
> +	struct tty_struct *tty = serport->tty;
> +
> +	if (!tty->ops->break_ctl)
> +		return -ENOTSUPP;

Documentation/dev-tools/checkpatch.rst
   429   **ENOTSUPP**
   430     ENOTSUPP is not a standard error code and should be avoided in new patches.
   431     EOPNOTSUPP should be used instead.
   432 
   433     See: https://lore.kernel.org/netdev/20200510182252.GA411829@lunn.ch/

Thanks
Greg KH Jan. 31, 2023, 9:50 a.m. UTC | #3
On Mon, Jan 30, 2023 at 11:35:02PM +0530, Neeraj Sanjay Kale wrote:
> Adds serdev_device_break_ctl() and an implementation for ttyport.

Please write a complete changelog text, as our documentation asks you
to.  This does not explain anything here :(

thanks,

greg k-h
diff mbox series

Patch

diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 0180e1e4e75d..26321ad7e71d 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -405,6 +405,17 @@  int serdev_device_set_tiocm(struct serdev_device *serdev, int set, int clear)
 }
 EXPORT_SYMBOL_GPL(serdev_device_set_tiocm);
 
+int serdev_device_break_ctl(struct serdev_device *serdev, int break_state)
+{
+	struct serdev_controller *ctrl = serdev->ctrl;
+
+	if (!ctrl || !ctrl->ops->break_ctl)
+		return -ENOTSUPP;
+
+	return ctrl->ops->break_ctl(ctrl, break_state);
+}
+EXPORT_SYMBOL_GPL(serdev_device_break_ctl);
+
 static int serdev_drv_probe(struct device *dev)
 {
 	const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver);
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index d367803e2044..847b1f71ab73 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -247,6 +247,17 @@  static int ttyport_set_tiocm(struct serdev_controller *ctrl, unsigned int set, u
 	return tty->ops->tiocmset(tty, set, clear);
 }
 
+static int ttyport_break_ctl(struct serdev_controller *ctrl, unsigned int break_state)
+{
+	struct serport *serport = serdev_controller_get_drvdata(ctrl);
+	struct tty_struct *tty = serport->tty;
+
+	if (!tty->ops->break_ctl)
+		return -ENOTSUPP;
+
+	return tty->ops->break_ctl(tty, break_state);
+}
+
 static const struct serdev_controller_ops ctrl_ops = {
 	.write_buf = ttyport_write_buf,
 	.write_flush = ttyport_write_flush,
@@ -259,6 +270,7 @@  static const struct serdev_controller_ops ctrl_ops = {
 	.wait_until_sent = ttyport_wait_until_sent,
 	.get_tiocm = ttyport_get_tiocm,
 	.set_tiocm = ttyport_set_tiocm,
+	.break_ctl = ttyport_break_ctl,
 };
 
 struct device *serdev_tty_port_register(struct tty_port *port,
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index 66f624fc618c..01b5b8f308cb 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -92,6 +92,7 @@  struct serdev_controller_ops {
 	void (*wait_until_sent)(struct serdev_controller *, long);
 	int (*get_tiocm)(struct serdev_controller *);
 	int (*set_tiocm)(struct serdev_controller *, unsigned int, unsigned int);
+	int (*break_ctl)(struct serdev_controller *, unsigned int);
 };
 
 /**
@@ -202,6 +203,7 @@  int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_
 void serdev_device_wait_until_sent(struct serdev_device *, long);
 int serdev_device_get_tiocm(struct serdev_device *);
 int serdev_device_set_tiocm(struct serdev_device *, int, int);
+int serdev_device_break_ctl(struct serdev_device *, int);
 void serdev_device_write_wakeup(struct serdev_device *);
 int serdev_device_write(struct serdev_device *, const unsigned char *, size_t, long);
 void serdev_device_write_flush(struct serdev_device *);
@@ -255,6 +257,10 @@  static inline int serdev_device_set_tiocm(struct serdev_device *serdev, int set,
 {
 	return -ENOTSUPP;
 }
+static inline int serdev_device_break_ctl(struct serdev_device *serdev, int break_state)
+{
+	return -ENOTSUPP;
+}
 static inline int serdev_device_write(struct serdev_device *sdev, const unsigned char *buf,
 				      size_t count, unsigned long timeout)
 {