Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>

-5
-5
drivers/usb/serial/mos7840.c
··· 730 730 * this function is called by the tty driver when it wants to know how many 731 731 * bytes of data we currently have outstanding in the port (data that has 732 732 * been written, but hasn't made it out the port yet) 733 - * If successful, we return the number of bytes left to be written in the 734 - * system, 735 - * Otherwise we return zero. 736 733 *****************************************************************************/ 737 734 738 735 static unsigned int mos7840_chars_in_buffer(struct tty_struct *tty) ··· 811 814 * mos7840_write_room 812 815 * this function is called by the tty driver when it wants to know how many 813 816 * bytes of data we can accept for a specific port. 814 - * If successful, we return the amount of room that we have for this port 815 - * Otherwise we return a negative error number. 816 817 *****************************************************************************/ 817 818 818 819 static unsigned int mos7840_write_room(struct tty_struct *tty)