linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: sunjunyong <sunjy516@gmail.com>
Cc: arnd@arndb.de, sunjunyong@xiaomi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ttyprintk: optimize tpk_close flush code
Date: Thu, 12 Nov 2020 18:17:15 +0100	[thread overview]
Message-ID: <X61uGxi32JqMsGWl@kroah.com> (raw)
In-Reply-To: <20201112134122.GA20821@mi-OptiPlex-7050>

A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Thu, Nov 12, 2020 at 09:41:22PM +0800, sunjunyong wrote:
> Hi Greg:
> It have no logic that handles NULL in tpk_flush() but tpk_printk().

Sorry, yes, that is what I mean.

> Do you mean that if i understand correctly?!I think we should not remove 
> the logic that handles NULL in tpk_printk() as we don't know if the buf 
> from parent caller is null or not.

Yes you do, you control that buffer right?  This is a static function,
you know what is happening here.

> But we transfer a null buf to tpk_printk()
>  for previous version of tpk_close, i think it's redundant.
> 
> The comment is a hitory tip for other guys to understand.I suggest to 
> keep it as before if you like.

The call to flush makes it obvious, no need to keep it.  And we have git
history for people to look at if they are curious about past versions.

thanks,

greg k-h

  reply	other threads:[~2020-11-12 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  6:02 [PATCH] ttyprintk: optimize tpk_close flush code Junyong Sun
2020-11-12  7:52 ` Greg KH
2020-11-12 13:41   ` sunjunyong
2020-11-12 17:17     ` Greg KH [this message]
2020-11-13  2:38       ` sunjunyong

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=X61uGxi32JqMsGWl@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sunjunyong@xiaomi.com \
    --cc=sunjy516@gmail.com \
    /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).