Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237321

[for-next][PATCH 08/25] tracing: Turn seq_print_user_ip() into a static function

Path csiph.com!xmission!us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject [for-next][PATCH 08/25] tracing: Turn seq_print_user_ip() into a static function
Date Thu, 01 Oct 2015 14:00:03 +0200
Message-ID <qeKGL-383-37@gated-at.bofh.it> (permalink)
References <qeKGK-383-5@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org
User-Agent quilt/0.61-1
MIME-Version 1.0
Content-Type text/plain; charset=ISO-8859-15
Content-Disposition inline; filename=0008-tracing-Turn-seq_print_user_ip-into-a-static-functio.patch
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 49
Organization linux.* mail to news gateway
X-Original-Cc Ingo Molnar <mingo@kernel.org>, Andrew Morton <akpm@linux-foundation.org>
X-Original-Date Thu, 01 Oct 2015 07:55:32 -0400
X-Original-Message-ID <20151001115637.227159175@goodmis.org>
X-Original-References <20151001115524.066462793@goodmis.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1237321

Show key headers only | View raw


From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

seq_print_user_ip() is used in only one location in one file. Turn it into a
static function. We could inject its code into the caller, but that would
make the code a bit too complex. Keep the code separate.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_output.c | 4 ++--
 kernel/trace/trace_output.h | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 881cbdae1913..3b5dcdf19dea 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -322,8 +322,8 @@ seq_print_sym_offset(struct trace_seq *s, const char *fmt,
 # define IP_FMT "%016lx"
 #endif
 
-int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
-		      unsigned long ip, unsigned long sym_flags)
+static int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
+			     unsigned long ip, unsigned long sym_flags)
 {
 	struct file *file = NULL;
 	unsigned long vmstart = 0;
diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h
index b774c06cf423..fabc49bcd493 100644
--- a/kernel/trace/trace_output.h
+++ b/kernel/trace/trace_output.h
@@ -14,8 +14,6 @@ trace_print_printk_msg_only(struct trace_iterator *iter);
 extern int
 seq_print_ip_sym(struct trace_seq *s, unsigned long ip,
 		unsigned long sym_flags);
-extern int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
-			     unsigned long ip, unsigned long sym_flags);
 
 extern int trace_print_context(struct trace_iterator *iter);
 extern int trace_print_lat_context(struct trace_iterator *iter);
-- 
2.5.1


--
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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[for-next][PATCH 08/25] tracing: Turn seq_print_user_ip() into a static function Steven Rostedt <rostedt@goodmis.org> - 2015-10-01 14:00 +0200

csiph-web