linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 16/16] tty: drop tty_flip_buffer_push
Date: Thu, 23 Sep 2021 10:32:51 +0200	[thread overview]
Message-ID: <YUw7s76Pi5B4RJoL@hovoldconsulting.com> (raw)
In-Reply-To: <1fd9ed1a-edd2-a154-da1c-022a89b2c722@kernel.org>

On Wed, Sep 22, 2021 at 08:57:17AM +0200, Jiri Slaby wrote:
> On 16. 09. 21, 12:03, Johan Hovold wrote:
> > On Tue, Sep 14, 2021 at 11:14:15AM +0200, Jiri Slaby wrote:
> >> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> >> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). All
> >> users were converted, so remove tty_flip_buffer_push() completely.

> > The name tty_flip_buffer_push() is arguable more descriptive since the
> > work may already be running and is also less tied to the implementation.
> > 
> > The ratio of drivers using tty_flip_buffer_push() over
> > tty_schedule_flip() is also something like 186 to 15 so that would
> > amount to a lot less churn too.
> 
> OK, I can do either way. I chose this path as tty_schedule_flip was a 
> wrapper to tty_flip_buffer_push. In any case, I wouldn't take the number 
> of changed drivers as a measure. But if it makes more sense for people 
> regarding the naming, I will "flip" the two flips.

I'd prefer that. The name tty_flip_buffer_push() is more descriptive and
we've been using it in virtually all tty drivers since 1997. No need to
force people to relearn the pattern of tty insert + push.

(Also note that the kernel doc for tty_schedule_flip() says "push
characters to ldisc", while the name more reflects how the tty buffering
was originally implemented.)
 
> > Also, can you please start adding cover letters to your series to
> > provide an overview of what it is you're trying to accomplish?
> 
> I am not a fan of cover letters as they are not Cced to people who are 
> Cced in separate patches. So what would you like to see in the letter? 
> This series are just a random cleanup and IMO there is not much more to 
> be said except what is in their commit logs.

Even if all it said was "random cleanups" it would still be worth having
as I'd know that this is just Jiri moving code about and not necessarily
something that needs deeper review.

In this case the driver commit messages only said that "[w]e are going
to remove [tty_flip_buffer_push()]" without any real explanation why
that was chosen over the alternatives. I had to look up the series on
lore to look for more details. But since there's no cover letter I end
up having to skim the entire series only to come up mostly empty handed
as the final patch just added "One less exported function" as some sort
of motivation.

Let's not make it harder for reviewers. If you're sending random cleanup
patches then say so. And if they can be grouped into a few classes as
seemed to be the case here then having those outlined is also helpful.

Johan

  reply	other threads:[~2021-09-23  8:32 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
2021-09-14  9:11 ` [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops Jiri Slaby
2021-09-14  9:11 ` [PATCH 03/16] tty: remove extern from functions in tty headers Jiri Slaby
2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
2021-09-15  8:05   ` Marc Kleine-Budde
2021-09-15 11:48   ` Mark Brown
2021-09-21  3:59   ` Dmitry Torokhov
2021-09-14  9:11 ` [PATCH 05/16] tty: remove file from tty_mode_ioctl Jiri Slaby
2021-09-15  8:05   ` Marc Kleine-Budde
2021-09-14  9:11 ` [PATCH 06/16] tty: remove file from n_tty_ioctl_helper Jiri Slaby
2021-09-14  9:15   ` Krzysztof Kozlowski
2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
2021-09-14  9:16   ` Krzysztof Kozlowski
2021-09-15  8:02   ` Marc Kleine-Budde
2021-09-21  4:00   ` Dmitry Torokhov
2021-09-21 10:52     ` Jiri Slaby
2021-09-21 11:36       ` Greg KH
2021-09-21 15:51         ` Jiri Slaby
2021-09-22 15:01           ` Greg KH
2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
2021-09-14  9:14   ` [PATCH 09/16] tty: drivers/tty/, " Jiri Slaby
2021-09-14 16:06     ` David Sterba
2021-09-14  9:14   ` [PATCH 10/16] tty: drivers/usb/serial/, " Jiri Slaby
2021-09-14  9:14   ` [PATCH 11/16] tty: drivers/usb/, " Jiri Slaby
2021-09-14  9:14   ` [PATCH 12/16] tty: arch/, " Jiri Slaby
2021-09-15  8:10     ` Max Filippov
2021-09-14  9:14   ` [PATCH 13/16] tty: drivers/s390/char/, " Jiri Slaby
2021-09-14  9:14   ` [PATCH 14/16] tty: drivers/staging/, " Jiri Slaby
2021-09-14 13:19     ` [greybus-dev] " Alex Elder
2021-09-14  9:14   ` [PATCH 15/16] tty: the rest, " Jiri Slaby
2021-09-14 11:58     ` Samuel Iglesias Gonsálvez
2021-09-14  9:14   ` [PATCH 16/16] tty: drop tty_flip_buffer_push Jiri Slaby
2021-09-16 10:03     ` Johan Hovold
2021-09-22  6:57       ` Jiri Slaby
2021-09-23  8:32         ` Johan Hovold [this message]
2021-11-18  7:54         ` Jiri Slaby
2021-11-18  8:10           ` Johan Hovold
2021-09-14  9:17   ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Krzysztof Kozlowski
2021-09-14 12:54   ` Uwe Kleine-König
2021-09-14 13:53   ` Richard Genoud
2021-09-15 17:00   ` Tobias Klauser
2021-09-15 17:53   ` Andreas Färber
2021-09-15 23:43   ` Andrew Jeffery
2021-09-16  7:13   ` Nicolas Ferre
2021-09-16  7:32   ` Chunyan Zhang
2021-09-16  7:48   ` Neil Armstrong
2021-09-16 12:54   ` Russell King (Oracle)
2021-09-16 20:30   ` Vladimir Zapolskiy

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=YUw7s76Pi5B4RJoL@hovoldconsulting.com \
    --to=johan@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).