diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-10 11:15:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 21:12:46 +0200 |
commit | 95713967ba52389f7cea75704d0cf048080ec218 (patch) | |
tree | fec0df386db066c0026c8eb2e7fef035903e9af0 /drivers/usb/serial | |
parent | dcaafbe6ee3b39f2df11a1352f85172f8ade17a5 (diff) | |
download | linux-95713967ba52389f7cea75704d0cf048080ec218.tar.gz linux-95713967ba52389f7cea75704d0cf048080ec218.tar.bz2 linux-95713967ba52389f7cea75704d0cf048080ec218.zip |
tty: make tty_operations::write()'s count size_t
Unify with the rest of the code. Use size_t for counts and ssize_t for
retval.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-30-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 51f738ea3f77..17b09f03ef84 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -361,7 +361,7 @@ static void serial_cleanup(struct tty_struct *tty) module_put(owner); } -static int serial_write(struct tty_struct *tty, const u8 *buf, int count) +static ssize_t serial_write(struct tty_struct *tty, const u8 *buf, size_t count) { struct usb_serial_port *port = tty->driver_data; int retval = -ENODEV; @@ -369,7 +369,7 @@ static int serial_write(struct tty_struct *tty, const u8 *buf, int count) if (port->serial->dev->state == USB_STATE_NOTATTACHED) goto exit; - dev_dbg(&port->dev, "%s - %d byte(s)\n", __func__, count); + dev_dbg(&port->dev, "%s - %zu byte(s)\n", __func__, count); retval = port->serial->type->write(tty, port, buf, count); if (retval < 0) |