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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b46d3edd-adb8-c91a-c1-a2cfe39205f@linux.intel.com>
Date:   Tue, 27 Sep 2022 14:47:37 +0300 (EEST)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Jiri Slaby <jslaby@...e.cz>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] tty: serial: extend lqasc_tx_ready() to
 lqasc_console_putchar()

On Tue, 27 Sep 2022, Jiri Slaby wrote:

> There is one more place where lqasc_tx_ready() can be used now:
> lqasc_console_putchar(). So replace the open-coded variant by the
> helper.
> 
> Suggested-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

> ---
>  drivers/tty/serial/lantiq.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
> index 6da1b7496c6c..ba9739af30ed 100644
> --- a/drivers/tty/serial/lantiq.c
> +++ b/drivers/tty/serial/lantiq.c
> @@ -606,15 +606,12 @@ static const struct uart_ops lqasc_pops = {
>  static void
>  lqasc_console_putchar(struct uart_port *port, unsigned char ch)
>  {
> -	int fifofree;
> -
>  	if (!port->membase)
>  		return;
>  
> -	do {
> -		fifofree = (__raw_readl(port->membase + LTQ_ASC_FSTAT)
> -			& ASCFSTAT_TXFREEMASK) >> ASCFSTAT_TXFREEOFF;
> -	} while (fifofree == 0);
> +	while (!lqasc_tx_ready(port))
> +		;
> +
>  	writeb(ch, port->membase + LTQ_ASC_TBUF);
>  }
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ