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

tty: caif: do not use N_TTY_BUF_SIZE

N_TTY_BUF_SIZE -- as the name suggests -- is the N_TTY's buffer size.
There is no reason to couple that to caif's tty->receive_room. Use 4096
directly -- even though, it should be some sort of "SKB_MAX_ALLOC" or
alike. But definitely not N_TTY_BUF_SIZE.

N_TTY_BUF_SIZE is private and will be moved to n_tty.c later.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
Link: https://lore.kernel.org/r/20250317070046.24386-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
0738abc2 ec1132dd

+1 -1
+1 -1
drivers/net/caif/caif_serial.c
··· 344 344 ser->tty = tty_kref_get(tty); 345 345 ser->dev = dev; 346 346 debugfs_init(ser, tty); 347 - tty->receive_room = N_TTY_BUF_SIZE; 347 + tty->receive_room = 4096; 348 348 tty->disc_data = ser; 349 349 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); 350 350 rtnl_lock();