From: Jiri Slaby <jirislaby@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v1 1/1] serial: 8520_ce4100: Reuse mem_serial_in() in ce4100_mem_serial_in()
Date: Tue, 1 Jul 2025 07:14:03 +0200 [thread overview]
Message-ID: <a6618492-4f39-4c4d-bad8-8bd982f590b4@kernel.org> (raw)
In-Reply-To: <aGKRfuu0p9krbejj@smile.fi.intel.com>
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
prev parent reply other threads:[~2025-07-01 5:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 12:54 [PATCH v1 1/1] serial: 8520_ce4100: Reuse mem_serial_in() in ce4100_mem_serial_in() Andy Shevchenko
2025-06-30 13:02 ` Jiri Slaby
2025-06-30 13:30 ` Andy Shevchenko
2025-07-01 5:14 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6618492-4f39-4c4d-bad8-8bd982f590b4@kernel.org \
--to=jirislaby@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox