]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tty: rfcomm: convert counts to size_t
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 10 Aug 2023 09:15:10 +0000 (11:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 19:12:47 +0000 (21:12 +0200)
Unify the type of tty_operations::write() counters with the 'count'
parameter. I.e. use size_t for them.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Link: https://lore.kernel.org/r/20230810091510.13006-37-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/rfcomm/tty.c

index 33b135ed59c42c7a6ba484addca479451f4fec34..94ec913dfb76e84b711dd6f3f8333c2994de9b2e 100644 (file)
@@ -785,12 +785,12 @@ static ssize_t rfcomm_tty_write(struct tty_struct *tty, const u8 *buf,
        struct rfcomm_dev *dev = tty->driver_data;
        struct rfcomm_dlc *dlc = dev->dlc;
        struct sk_buff *skb;
-       int sent = 0, size;
+       size_t sent = 0, size;
 
        BT_DBG("tty %p count %zu", tty, count);
 
        while (count) {
-               size = min_t(uint, count, dlc->mtu);
+               size = min_t(size_t, count, dlc->mtu);
 
                skb = rfcomm_wmalloc(dev, size + RFCOMM_SKB_RESERVE, GFP_ATOMIC);
                if (!skb)