linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sunjunyong <sunjy516@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: arnd@arndb.de, sunjunyong@xiaomi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ttyprintk: optimize tpk_close flush code
Date: Sat, 28 Nov 2020 14:33:13 +0800	[thread overview]
Message-ID: <20201128063313.GA31258@mi-OptiPlex-7050> (raw)
In-Reply-To: <X7N2A+i22d6sC0lH@kroah.com>

Hi Greg:

Sorry for the late reply.
> Why did you not make the change to tpk_printk() as well that I asked you
> to?
> 
> It is a static function, you control the callers, so the extra "is this
> NULL, if so flush" logic makes no sense to keep around anymore, right?
tpk_printk have logic to judge whether the input parameter is NULL.But for
below removed line, we already have known the input parameter is null, so
we don't need call logic of judge NULL, just call tpk_flush to flush is enough.
This is just a little optimization.
----------------------------
-	tpk_printk(NULL, 0);
----------------------------

Brs.
Junyong

      reply	other threads:[~2020-11-28 21:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17  2:21 [PATCH v2] ttyprintk: optimize tpk_close flush code Junyong Sun
2020-11-17  7:04 ` Greg KH
2020-11-28  6:33   ` sunjunyong [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=20201128063313.GA31258@mi-OptiPlex-7050 \
    --to=sunjy516@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sunjunyong@xiaomi.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).