All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/7] serial: pch: move size check from pop_tx one level up
Date: Tue, 3 May 2022 11:24:53 +0200	[thread overview]
Message-ID: <CAHp75VfLw2pYMvaEoF+JuqN+H0wyo7ZfbkpefwtebCkOGVT0QQ@mail.gmail.com> (raw)
In-Reply-To: <20220503080613.27601-2-jslaby@suse.cz>

On Tue, May 3, 2022 at 10:12 AM Jiri Slaby <jslaby@suse.cz> wrote:
>
> 'count' is zero in the pop_tx()'s comparison against 'size'. So the 'if'
> tries to find out if 'size' is negative or zero and returns in that
> case. But it cannot be negative, due to previous (size < 0) check in the
> caller: handle_tx().
>
> So simply move this check from pop_tx() to handle_tx(). Now it's clear
> that pop_tx() is called only if fifo_size is non-zero.

I'm in favour of the series, but ideally this driver should be
converted to be a part of the 8250 family.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2022-05-03  9:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  8:06 [PATCH 0/7] serial: pch: cleanup Jiri Slaby
2022-05-03  8:06 ` [PATCH 1/7] serial: pch: move size check from pop_tx one level up Jiri Slaby
2022-05-03  9:24   ` Andy Shevchenko [this message]
2022-05-03  8:08 ` [PATCH 2/7] serial: pch: don't overwrite xmit->buf[0] by x_char Jiri Slaby
2022-05-03  8:08   ` [PATCH 3/7] serial: pch: decomission pch_uart_hal_write() Jiri Slaby
2022-05-03  8:08   ` [PATCH 4/7] serial: pch: remove debug print from pop_tx Jiri Slaby
2022-05-03  8:08   ` [PATCH 5/7] serial: pch: remove xmit circ_buf size double check Jiri Slaby
2022-05-03  8:08   ` [PATCH 6/7] serial: pch: simplify pop_tx() even more Jiri Slaby
2022-05-03  8:08   ` [PATCH 7/7] serial: pch: inline pop_tx() into handle_tx() 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=CAHp75VfLw2pYMvaEoF+JuqN+H0wyo7ZfbkpefwtebCkOGVT0QQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.