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

2020-11-28 Thread sunjunyong
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 w

Re: [PATCH] ttyprintk: optimize tpk_close flush code

2020-11-12 Thread sunjunyong
Hi greg: > 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. you are right. I would remove it in next version. Any other suggestions ? thanks! JY.

Re: [PATCH] ttyprintk: optimize tpk_close flush code

2020-11-12 Thread sunjunyong
Hi Greg: It have no logic that handles NULL in tpk_flush() but tpk_printk(). 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.But we transfer a null buf to tpk_printk(