Re: [PATCH v2] ttyprintk: optimize tpk_close flush code

From: sunjunyong
Date: Sat Nov 28 2020 - 16:58:46 EST


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