lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <abdaa38e-77e4-435e-94c4-91bc24b49b02@riscstar.com>
Date: Mon, 17 Mar 2025 07:35:08 -0500
From: Alex Elder <elder@...cstar.com>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>, gregkh@...uxfoundation.org
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
 Johan Hovold <johan@...nel.org>, David Lin <dtwlin@...il.com>,
 Alex Elder <elder@...nel.org>, greybus-dev@...ts.linaro.org,
 linux-staging@...ts.linux.dev
Subject: Re: [PATCH v2 22/31] tty: staging/greybus: pass tty_driver flags to
 tty_alloc_driver()

On 3/17/25 2:00 AM, Jiri Slaby (SUSE) wrote:
> tty_alloc_driver() is supposed to receive tty driver flags.

Looks like tty_alloc_driver() doesn't directly depend on the
two flags passed in this case, but this corrects the code.

Looks good to me.

Reviewed-by: Alex Elder <elder@...cstar.com>

> 
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
> Acked-by: Johan Hovold <johan@...nel.org>
> Cc: David Lin <dtwlin@...il.com>
> Cc: Alex Elder <elder@...nel.org>
> Cc: greybus-dev@...ts.linaro.org
> Cc: linux-staging@...ts.linux.dev
> ---
>   drivers/staging/greybus/uart.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
> index 8eab94cb06fa..308ed1ca9947 100644
> --- a/drivers/staging/greybus/uart.c
> +++ b/drivers/staging/greybus/uart.c
> @@ -948,7 +948,8 @@ static int gb_tty_init(void)
>   {
>   	int retval = 0;
>   
> -	gb_tty_driver = tty_alloc_driver(GB_NUM_MINORS, 0);
> +	gb_tty_driver = tty_alloc_driver(GB_NUM_MINORS, TTY_DRIVER_REAL_RAW |
> +					 TTY_DRIVER_DYNAMIC_DEV);
>   	if (IS_ERR(gb_tty_driver)) {
>   		pr_err("Can not allocate tty driver\n");
>   		retval = -ENOMEM;
> @@ -961,7 +962,6 @@ static int gb_tty_init(void)
>   	gb_tty_driver->minor_start = 0;
>   	gb_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
>   	gb_tty_driver->subtype = SERIAL_TYPE_NORMAL;
> -	gb_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
>   	gb_tty_driver->init_termios = tty_std_termios;
>   	gb_tty_driver->init_termios.c_cflag = B9600 | CS8 |
>   		CREAD | HUPCL | CLOCAL;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ