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: <aGKRfuu0p9krbejj@smile.fi.intel.com>
Date: Mon, 30 Jun 2025 16:30:38 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	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 Mon, Jun 30, 2025 at 03:02:11PM +0200, Jiri Slaby wrote:
> 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.

...

> >   	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)?

Ah, good catch! It's probably better in the original form, i.e.

	if ((offset != UART_IIR) || !(ret & UART_IIR_NO_INT))

What do you think?

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ