Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933095AbbD0SA3 (ORCPT ); Mon, 27 Apr 2015 14:00:29 -0400 Received: from smtprelay0078.hostedemail.com ([216.40.44.78]:55436 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932949AbbD0SAV convert rfc822-to-8bit (ORCPT ); Mon, 27 Apr 2015 14:00:21 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:152:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3872:3874:4321:4362:5007:6261:7875:7904:10004:10400:10848:10967:11026:11232:11658:11914:12043:12114:12296:12438:12517:12519:12555:12740:13069:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: stone66_5a1c7e3fbe22a X-Filterd-Recvd-Size: 2577 Date: Mon, 27 Apr 2015 14:00:18 -0400 From: Steven Rostedt To: Dave P Martin Cc: Alex =?UTF-8?B?QmVubsOpZQ==?= , "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: <20150427140018.5b64cac3@gandalf.local.home> In-Reply-To: <20150427142201.GB3590@e103592.cambridge.arm.com> References: <1430137069-859-1-git-send-email-alex.bennee@linaro.org> <20150427142201.GB3590@e103592.cambridge.arm.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1627 Lines: 53 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. > > > 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. Thanks, -- Steve -- 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/