Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964907AbbD0OWL (ORCPT ); Mon, 27 Apr 2015 10:22:11 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:15718 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932705AbbD0OWI convert rfc822-to-8bit (ORCPT ); Mon, 27 Apr 2015 10:22:08 -0400 Date: Mon, 27 Apr 2015 15:22:02 +0100 From: Dave P Martin To: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: "rostedt@goodmis.org" , "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 Message-ID: <20150427142201.GB3590@e103592.cambridge.arm.com> References: <1430137069-859-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 In-Reply-To: <1430137069-859-1-git-send-email-alex.bennee@linaro.org> user-agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 27 Apr 2015 14:22:02.0101 (UTC) FILETIME=[876ACA50:01D080F5] X-MC-Unique: ob8qI1WjTH2wk1TsV59JQQ-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 45 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? > 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". Cheers ---Dave [...] -- 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/