public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2 03/31] tty: caif: do not use N_TTY_BUF_SIZE
Date: Thu, 20 Mar 2025 11:17:01 +0000	[thread overview]
Message-ID: <20250320111701.GI280585@kernel.org> (raw)
In-Reply-To: <20250317070046.24386-4-jirislaby@kernel.org>

On Mon, Mar 17, 2025 at 08:00:18AM +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.

Hi Jiri,

My 2c worth is that 4096 seems like an arbitrary value.
Which is fine, but perhaps a comment is warranted.

> 
> 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
> ---
>  drivers/net/caif/caif_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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();
> -- 
> 2.49.0
> 
> 

  reply	other threads:[~2025-03-20 11:17 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17  7:00 [PATCH v2 00/31] tty: cleanup no. 99 Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 01/31] tty: convert "TTY Struct Flags" to an enum Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 02/31] tty: audit: do not use N_TTY_BUF_SIZE Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 03/31] tty: caif: " Jiri Slaby (SUSE)
2025-03-20 11:17   ` Simon Horman [this message]
2025-03-17  7:00 ` [PATCH v2 04/31] tty: move N_TTY_BUF_SIZE to n_tty Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 05/31] tty: n_tty: use uint for space returned by tty_write_room() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 06/31] tty: n_tty: simplify process_output() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 07/31] tty: n_tty: clean up process_output_block() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 08/31] tty: n_tty: drop n_tty_trace() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 09/31] tty: n_tty: extract n_tty_continue_cookie() from n_tty_read() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 10/31] tty: n_tty: extract n_tty_wait_for_input() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 11/31] tty: n_tty: move more_to_be_read to the end of n_tty_read() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 12/31] tty: tty_driver: move TTY macros to the top Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 13/31] tty: tty_driver: convert "TTY Driver Flags" to an enum Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 14/31] tty: tty_driver: document both {,__}tty_alloc_driver() properly Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 15/31] tty: tty_driver: introduce TTY driver sub/types enums Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 16/31] tty: serdev: drop serdev_controller_ops::write_room() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 17/31] tty: mmc: sdio: use bool for cts and remove parentheses Jiri Slaby (SUSE)
2025-03-17 10:50   ` Ulf Hansson
2025-03-17  7:00 ` [PATCH v2 18/31] tty: moxa: drop version dump to logs Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 19/31] tty: moxa: drop ISA support Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 20/31] tty: moxa: carve out special ioctls and extra tty_port Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 21/31] tty: srmcons: fix retval from srmcons_init() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 22/31] tty: staging/greybus: pass tty_driver flags to tty_alloc_driver() Jiri Slaby (SUSE)
2025-03-17 12:35   ` Alex Elder
2025-03-17  7:00 ` [PATCH v2 23/31] tty: sunsu: drop serial_{in,out}p() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 24/31] tty: sunsu: remove unused serial_icr_read() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 25/31] serial: remove redundant tty_port_link_device() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 26/31] serial: pass struct uart_state to uart_line_info() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 27/31] serial: 8250: use serial_port_in/out() helpers Jiri Slaby (SUSE)
2025-03-17  7:25   ` Andy Shevchenko
2025-03-17  7:42     ` Jiri Slaby
2025-03-17  7:00 ` [PATCH v2 28/31] serial: 8250_rsa: simplify rsa8250_{request/release}_resource() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 29/31] serial: 8250_port: do not use goto for UPQ_NO_TXEN_TEST code flow Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 30/31] serial: 8250_port: simplify serial8250_request_std_resource() Jiri Slaby (SUSE)
2025-03-17  7:00 ` [PATCH v2 31/31] serial: switch change_irq and change_port to bool in uart_set_info() Jiri Slaby (SUSE)
2025-03-17  7:03 ` [PATCH v2 00/31] tty: cleanup no. 99 Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250320111701.GI280585@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox