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: <a6618492-4f39-4c4d-bad8-8bd982f590b4@kernel.org>
Date: Tue, 1 Jul 2025 07:14:03 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
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 30. 06. 25, 15:30, Andy Shevchenko wrote:
> 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?

Without the parens around the offset check, yes.

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ