Message ID | 20250220111606.138045-4-jirislaby@kernel.org |
---|---|
State | New |
Headers | show |
Series | [01/29] tty: convert "TTY Struct Flags" to an enum | expand |
On Thu, 20 Feb 2025 12:15:40 +0100 Jiri Slaby (SUSE) wrote: > 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. Acked-by: Jakub Kicinski <kuba@kernel.org>
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c index ed3a589def6b..e7d1b9301fde 100644 --- a/drivers/net/caif/caif_serial.c +++ b/drivers/net/caif/caif_serial.c @@ -344,7 +344,7 @@ static int ldisc_open(struct tty_struct *tty) ser->tty = tty_kref_get(tty); ser->dev = dev; debugfs_init(ser, tty); - tty->receive_room = N_TTY_BUF_SIZE; + tty->receive_room = 4096; tty->disc_data = ser; set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); rtnl_lock();
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> Cc: Andrew Lunn <andrew+netdev@lunn.ch> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: netdev@vger.kernel.org --- drivers/net/caif/caif_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)