From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755733AbdDEQWb (ORCPT ); Wed, 5 Apr 2017 12:22:31 -0400 Received: from mail.kernel.org ([198.145.29.136]:45192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755496AbdDEQVu (ORCPT ); Wed, 5 Apr 2017 12:21:50 -0400 Message-Id: <20170405162147.140353943@goodmis.org> User-Agent: quilt/0.63-1 Date: Wed, 05 Apr 2017 12:21:12 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton Subject: [for-next][PATCH 3/7] ftrace: Return NULL at end of t_start() instead of calling t_hash_start() References: <20170405162109.825936532@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=0003-ftrace-Return-NULL-at-end-of-t_start-instead-of-call.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Steven Rostedt (VMware)" The loop in t_start() of calling t_next() will call t_hash_start() if the pos is beyond the functions and enters the hash items. There's no reason to check if p is NULL and call t_hash_start(), as that would be redundant. Signed-off-by: Steven Rostedt (VMware) --- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 3165b7f840e6..421530831ddd 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3255,7 +3255,7 @@ static void *t_start(struct seq_file *m, loff_t *pos) } if (!p) - return t_hash_start(m, pos); + return NULL; return iter; } -- 2.10.2