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 Greg KH
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 includ

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(

Re: [PATCH] ttyprintk: optimize tpk_close flush code

2020-11-11 Thread Greg KH
On Wed, Nov 04, 2020 at 02:02:24PM +0800, Junyong Sun wrote: > tpk_printk(NULL,0) do nothing but call tpk_flush to > flush buffer, so why don't use tpk_flush diretcly? > this is a small optimization. > > Signed-off-by: Junyong Sun > --- > drivers/char/ttyprintk.c | 2 +- > 1 file changed, 1 inse

[PATCH] ttyprintk: optimize tpk_close flush code

2020-11-03 Thread Junyong Sun
tpk_printk(NULL,0) do nothing but call tpk_flush to flush buffer, so why don't use tpk_flush diretcly? this is a small optimization. Signed-off-by: Junyong Sun --- drivers/char/ttyprintk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/ttyprintk.c b/drivers/char