linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Namit Gupta <gupta.namit@samsung.com>,
	linux-kernel@vger.kernel.org, pankaj.m@samsung.com,
	a.sahrawat@samsung.com, himanshu.m@samsung.com
Subject: Re: [PATCH] printk: remove unnecessary kmalloc() from syslog during clear
Date: Tue, 26 Jun 2018 10:39:59 -0400	[thread overview]
Message-ID: <20180626103959.79e92a35@gandalf.local.home> (raw)
In-Reply-To: <20180626124332.62isabqkefpgqpgk@pathway.suse.cz>

On Tue, 26 Jun 2018 14:43:32 +0200
Petr Mladek <pmladek@suse.com> wrote:

> On Mon 2018-06-25 23:44:07, Sergey Senozhatsky wrote:
> > On (06/25/18 10:37), Steven Rostedt wrote:  
> > > 
> > > Is IMHO rather ugly.  
> > 
> > Either way works for me. So I'll leave it to you and Petr to decide :)
> >   
> > > And the original patch has one more advantage. If buf and clear are
> > > both NULL/zero, we don't take any locks.  
> > 
> > But we never use syslog_print_all(buf = NULL, clear = false). It's either
> > NULL/true [move forward clear idx, do not copy to user], or !NULL/use defined
> > value [copy to user, move or don't move clear idx forward]  
> 
> Yup, I suggest the following version as a compromise. It has the code
> duplication but I agree that it is negligible. Otherwise, it looks
> cleaner.
> 

This looks fine. For proper history though, what I do in this case,
would be to make this into two patches. One with Namit's original
patch, and then a second that removes the code duplication (your patch).

-- Steve


  reply	other threads:[~2018-06-26 14:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180620135951epcas5p3bd2a8f25ec689ca333bce861b527dba2@epcas5p3.samsung.com>
2018-06-20 13:56 ` [PATCH] printk: remove unnecessary kmalloc() from syslog during clear Namit Gupta
2018-06-20 14:16   ` Steven Rostedt
2018-06-21  6:58   ` Sergey Senozhatsky
2018-06-25 13:37   ` Petr Mladek
2018-06-25 13:42     ` Jiri Kosina
2018-06-25 14:35     ` Sergey Senozhatsky
2018-06-25 14:37     ` Steven Rostedt
2018-06-25 14:44       ` Sergey Senozhatsky
2018-06-26 12:43         ` Petr Mladek
2018-06-26 14:39           ` Steven Rostedt [this message]
2018-06-27 15:06             ` Petr Mladek
2018-07-09 11:48               ` Petr Mladek

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=20180626103959.79e92a35@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=a.sahrawat@samsung.com \
    --cc=gupta.namit@samsung.com \
    --cc=himanshu.m@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.m@samsung.com \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky@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).