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

Configure Feed

Select the types of activity you want to include in your feed.

tty: rfcomm: convert counts to size_t

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>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
c70fd7c0 6fcd3b67

+2 -2
+2 -2
net/bluetooth/rfcomm/tty.c
··· 785 785 struct rfcomm_dev *dev = tty->driver_data; 786 786 struct rfcomm_dlc *dlc = dev->dlc; 787 787 struct sk_buff *skb; 788 - int sent = 0, size; 788 + size_t sent = 0, size; 789 789 790 790 BT_DBG("tty %p count %zu", tty, count); 791 791 792 792 while (count) { 793 - size = min_t(uint, count, dlc->mtu); 793 + size = min_t(size_t, count, dlc->mtu); 794 794 795 795 skb = rfcomm_wmalloc(dev, size + RFCOMM_SKB_RESERVE, GFP_ATOMIC); 796 796 if (!skb)