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: <023bb251-255d-4f0e-8b2a-d6c8bc35d75b@kernel.org>
Date: Mon, 30 Jun 2025 15:02:11 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v1 1/1] serial: 8520_ce4100: Reuse mem_serial_in() in
 ce4100_mem_serial_in()

On 30. 06. 25, 14:54, Andy Shevchenko wrote:
> In one place in ce4100_mem_serial_in() the code may be replaced with
> mem_serial_in() call. Do it so and collapse two conditionals into one.
> 
> Suggested-by: Jiri Slaby <jirislaby@...nel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>   drivers/tty/serial/8250/8250_ce4100.c | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_ce4100.c b/drivers/tty/serial/8250/8250_ce4100.c
> index 3dd88f372a51..8221b872fd33 100644
> --- a/drivers/tty/serial/8250/8250_ce4100.c
> +++ b/drivers/tty/serial/8250/8250_ce4100.c
> @@ -35,13 +35,8 @@ static u32 ce4100_mem_serial_in(struct uart_port *p, unsigned int offset)
>   {
>   	u32 ret, ier, lsr;
>   
> -	if (offset != UART_IIR)
> -		return mem_serial_in(p, offset);
> -
> -	offset <<= p->regshift;
> -
> -	ret = readl(p->membase + offset);
> -	if (!(ret & UART_IIR_NO_INT))
> +	ret = mem_serial_in(p, offset);
> +	if (!(offset == UART_IIR) && (ret & UART_IIR_NO_INT))

I am in haste, but a misplaced right paren (should be at the end)?

>   		return ret;
>   
>   	/* see if the TX interrupt should have really set */


-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ