[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210519092006.9775-6-johan@kernel.org>
Date: Wed, 19 May 2021 11:20:05 +0200
From: Johan Hovold <johan@...nel.org>
To: Johan Hovold <johan@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 5/6] USB: serial: mos7840: drop buffer-callback return-value comments
The driver write_room and chars_in_buffer callbacks used to incorrectly
return a negative errno in case they were called with a NULL port
driver-data pointer or if some other always-true sanity checks failed.
The bogus sanity checks were later removed by commit ce039bd4b21f ("USB:
serial: mos7840: drop paranoid port checks") and 7b2faede671a ("USB:
serial: mos7840: drop port driver data accessors") but the
function-header comments were never updated to match.
Drop the outdated return-value comments.
Signed-off-by: Johan Hovold <johan@...nel.org>
---
drivers/usb/serial/mos7840.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index b22ccbd98998..d7fe33ca73e4 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -730,9 +730,6 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
* this function is called by the tty driver when it wants to know how many
* bytes of data we currently have outstanding in the port (data that has
* been written, but hasn't made it out the port yet)
- * If successful, we return the number of bytes left to be written in the
- * system,
- * Otherwise we return zero.
*****************************************************************************/
static unsigned int mos7840_chars_in_buffer(struct tty_struct *tty)
@@ -814,8 +811,6 @@ static void mos7840_break(struct tty_struct *tty, int break_state)
* mos7840_write_room
* this function is called by the tty driver when it wants to know how many
* bytes of data we can accept for a specific port.
- * If successful, we return the amount of room that we have for this port
- * Otherwise we return a negative error number.
*****************************************************************************/
static unsigned int mos7840_write_room(struct tty_struct *tty)
--
2.26.3
Powered by blists - more mailing lists