From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>
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: Mon, 30 Jun 2025 16:30:38 +0300 [thread overview]
Message-ID: <aGKRfuu0p9krbejj@smile.fi.intel.com> (raw)
In-Reply-To: <023bb251-255d-4f0e-8b2a-d6c8bc35d75b@kernel.org>
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
next prev parent reply other threads:[~2025-06-30 13:30 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 [this message]
2025-07-01 5:14 ` Jiri Slaby
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=aGKRfuu0p9krbejj@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.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