Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030920AbbD1Oka (ORCPT ); Tue, 28 Apr 2015 10:40:30 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:51266 "EHLO socrates.bennee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031180AbbD1OkZ (ORCPT ); Tue, 28 Apr 2015 10:40:25 -0400 References: <1430137069-859-1-git-send-email-alex.bennee@linaro.org> <20150427142201.GB3590@e103592.cambridge.arm.com> <20150427140018.5b64cac3@gandalf.local.home> From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Steven Rostedt Cc: Dave P Martin , "mingo\@redhat.com" , "linux-kernel\@vger.kernel.org" , Oleg Nesterov , "Peter Zijlstra \(Intel\)" , Petr Mladek Subject: Re: [PATCH] tracing: make ftrace_print_array_seq compute buf_len In-reply-to: <20150427140018.5b64cac3@gandalf.local.home> Date: Tue, 28 Apr 2015 15:40:58 +0100 Message-ID: <87r3r4qps5.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1832 Lines: 64 Steven Rostedt writes: > On Mon, 27 Apr 2015 15:22:02 +0100 > Dave P Martin 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 >> > --- >> > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/