Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [PATCH 08/15] lttng: remove splice_to_pipe wrapper
Date: Wed, 30 Nov 2011 13:34:21 -0500	[thread overview]
Message-ID: <1322678068-5255-9-git-send-email-mathieu.desnoyers@efficios.com> (raw)
In-Reply-To: <1322678068-5255-1-git-send-email-mathieu.desnoyers@efficios.com>

Use the newly exported splice_to_pipe symbol.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
 drivers/staging/lttng/lib/Makefile                 |    3 +-
 .../lttng/lib/ringbuffer/ring_buffer_splice.c      |    3 +-
 drivers/staging/lttng/wrapper/splice.c             |   46 --------------------
 drivers/staging/lttng/wrapper/splice.h             |   23 ----------
 4 files changed, 2 insertions(+), 73 deletions(-)
 delete mode 100644 drivers/staging/lttng/wrapper/splice.c
 delete mode 100644 drivers/staging/lttng/wrapper/splice.h

diff --git a/drivers/staging/lttng/lib/Makefile b/drivers/staging/lttng/lib/Makefile
index e5735ec..9fa49ef 100644
--- a/drivers/staging/lttng/lib/Makefile
+++ b/drivers/staging/lttng/lib/Makefile
@@ -7,5 +7,4 @@ lib-ring-buffer-objs := \
 	ringbuffer/ring_buffer_vfs.o \
 	ringbuffer/ring_buffer_splice.o \
 	ringbuffer/ring_buffer_mmap.o \
-	prio_heap/lttng_prio_heap.o \
-	../wrapper/splice.o
+	prio_heap/lttng_prio_heap.o
diff --git a/drivers/staging/lttng/lib/ringbuffer/ring_buffer_splice.c b/drivers/staging/lttng/lib/ringbuffer/ring_buffer_splice.c
index ded18ba..fc89901 100644
--- a/drivers/staging/lttng/lib/ringbuffer/ring_buffer_splice.c
+++ b/drivers/staging/lttng/lib/ringbuffer/ring_buffer_splice.c
@@ -13,7 +13,6 @@
 #include <linux/module.h>
 #include <linux/fs.h>
 
-#include "../../wrapper/splice.h"
 #include "../../wrapper/ringbuffer/backend.h"
 #include "../../wrapper/ringbuffer/frontend.h"
 #include "../../wrapper/ringbuffer/vfs.h"
@@ -142,7 +141,7 @@ static int subbuf_splice_actor(struct file *in,
 	if (!spd.nr_pages)
 		return 0;
 
-	return wrapper_splice_to_pipe(pipe, &spd);
+	return splice_to_pipe(pipe, &spd);
 }
 
 ssize_t lib_ring_buffer_splice_read(struct file *in, loff_t *ppos,
diff --git a/drivers/staging/lttng/wrapper/splice.c b/drivers/staging/lttng/wrapper/splice.c
deleted file mode 100644
index ba224ee..0000000
--- a/drivers/staging/lttng/wrapper/splice.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers at efficios.com)
- *
- * wrapper around vmalloc_sync_all. Using KALLSYMS to get its address when
- * available, else we need to have a kernel that exports this function to GPL
- * modules.
- *
- * Dual LGPL v2.1/GPL v2 license.
- */
-
-#ifdef CONFIG_KALLSYMS
-
-#include <linux/kallsyms.h>
-#include <linux/fs.h>
-#include <linux/splice.h>
-#include "kallsyms.h"
-
-static
-ssize_t (*splice_to_pipe_sym)(struct pipe_inode_info *pipe,
-			      struct splice_pipe_desc *spd);
-
-ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe,
-			       struct splice_pipe_desc *spd)
-{
-	if (!splice_to_pipe_sym)
-		splice_to_pipe_sym = (void *) kallsyms_lookup_funcptr("splice_to_pipe"); 
-	if (splice_to_pipe_sym) {
-		return splice_to_pipe_sym(pipe, spd);
-	} else {
-		printk(KERN_WARNING "LTTng: splice_to_pipe symbol lookup failed.\n");
-		return -ENOSYS;
-	}
-}
-
-#else
-
-#include <linux/fs.h>
-#include <linux/splice.h>
-
-ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe,
-			       struct splice_pipe_desc *spd)
-{
-	return splice_to_pipe(pipe, spd);
-}
-
-#endif
diff --git a/drivers/staging/lttng/wrapper/splice.h b/drivers/staging/lttng/wrapper/splice.h
deleted file mode 100644
index f75309a..0000000
--- a/drivers/staging/lttng/wrapper/splice.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _LTT_WRAPPER_SPLICE_H
-#define _LTT_WRAPPER_SPLICE_H
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers at efficios.com)
- *
- * wrapper around vmalloc_sync_all. Using KALLSYMS to get its address when
- * available, else we need to have a kernel that exports this function to GPL
- * modules.
- *
- * Dual LGPL v2.1/GPL v2 license.
- */
-
-#include <linux/splice.h>
-
-ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe,
-			       struct splice_pipe_desc *spd);
-
-#ifndef PIPE_DEF_BUFFERS
-#define PIPE_DEF_BUFFERS 16
-#endif
-
-#endif /* _LTT_WRAPPER_SPLICE_H */
-- 
1.7.5.4




  parent reply	other threads:[~2011-11-30 18:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 18:34 [lttng-dev] LTTng wrapper cleanup Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 01/15] lttng lib: ring buffer: remove stale null-pointer Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 02/15] lttng lib: ring buffer remove duplicate null pointer Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 03/15] lttng lib: ring buffer move null pointer check to open Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 04/15] Export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 05/15] lttng wrapper: add missing include to kallsyms wrapper Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 06/15] Remove LTTng vmalloc_sync_all wrapper Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 07/15] fs/splice: export splice_to_pipe to modules Mathieu Desnoyers
2011-11-30 18:34 ` Mathieu Desnoyers [this message]
2011-11-30 18:34 ` [lttng-dev] [PATCH 09/15] lttng: remove perf_event_create_kernel_counter wrapper Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 10/15] lttng: remove ftrace function tracer support (but keep Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 11/15] lttng: remove raw spinlock wrapper Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 12/15] lttng: remove uuid wrapper Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 13/15] Export task_prio to modules Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 14/15] lttng: remove task_prio wrapper Mathieu Desnoyers
2011-11-30 18:34 ` [lttng-dev] [PATCH 15/15] lttng: remove kallsyms wrapper Mathieu Desnoyers
2011-11-30 18:47 ` [lttng-dev] LTTng wrapper cleanup Greg KH
2011-11-30 19:13   ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322678068-5255-9-git-send-email-mathieu.desnoyers@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox