mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Dave P Martin <Dave.Martin@arm.com>,
	"mingo\@redhat.com" <mingo@redhat.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	"Peter Zijlstra \(Intel\)" <peterz@infradead.org>,
	Petr Mladek <pmladek@suse.cz>
Subject: Re: [PATCH] tracing: make ftrace_print_array_seq compute buf_len
Date: Tue, 28 Apr 2015 15:40:58 +0100	[thread overview]
Message-ID: <87r3r4qps5.fsf@linaro.org> (raw)
In-Reply-To: <20150427140018.5b64cac3@gandalf.local.home>


Steven Rostedt <rostedt@goodmis.org> writes:

> On Mon, 27 Apr 2015 15:22:02 +0100
> Dave P Martin <Dave.Martin@arm.com> wrote:
>
>> On Mon, Apr 27, 2015 at 01:17:48PM +0100, Alex Bennée wrote:
>> > The only caller to this function was getting it wrong. I favoured
>> 
>> What caller?
>> 
>> Wrong in what way?
>
> Yes, please add that info to the change log.

It was ftrace's own __print_array, I'll add the info to v2.

>
>> 
>> > pushing the calculation to as close to the need as possible rather than
>> > fixing the one caller.
>> 
>> This seems reasonable, but...
>> 
>> > 
>> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> > ---
>> >  include/linux/ftrace_event.h | 2 +-
>> >  kernel/trace/trace_output.c  | 3 ++-
>> >  2 files changed, 3 insertions(+), 2 deletions(-)
>> > 
>> > diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
>> > index c674ee8..e6b0262 100644
>> > --- a/include/linux/ftrace_event.h
>> > +++ b/include/linux/ftrace_event.h
>> > @@ -45,7 +45,7 @@ const char *ftrace_print_hex_seq(struct trace_seq *p,
>> >  				 const unsigned char *buf, int len);
>> >  
>> >  const char *ftrace_print_array_seq(struct trace_seq *p,
>> > -				   const void *buf, int buf_len,
>> > +				   const void *buf, int len,
>> 
>> How is the name "len" less confusing than "buf_len"?
>> 
>> I suggest matching the name to the equivalent argument of the
>> __print_array macro -- i.e., "count".
>
> I agree, please change the variable name to "count", that will make more
> sense.

OK I'll re-spin today.

>
> Thanks,
>
> -- Steve

-- 
Alex Bennée

      reply	other threads:[~2015-04-28 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 12:17 Alex Bennée
2015-04-27 14:22 ` Dave P Martin
2015-04-27 18:00   ` Steven Rostedt
2015-04-28 14:40     ` Alex Bennée [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=87r3r4qps5.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=Dave.Martin@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.cz \
    --cc=rostedt@goodmis.org \
    /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

all inboxes | Powered by JetHome®