From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Michel Lespinasse <walken@google.com>
Subject: Re: [PATCH] lib: Export interval_tree
Date: Sun, 26 Jan 2014 14:54:44 +0100 [thread overview]
Message-ID: <20140126135444.GR9772@phenom.ffwll.local> (raw)
In-Reply-To: <1390739073-4519-1-git-send-email-chris@chris-wilson.co.uk>
On Sun, Jan 26, 2014 at 12:24:33PM +0000, Chris Wilson wrote:
> lib/interval_tree.c provides a simple interface for an interval-tree
> (an augmented red-black tree) but is only built when testing the generic
> macros for building interval-trees. For drivers with modest needs,
> export the simple interval-tree library as is.
>
> v2: Lots of help from Michel Lespinasse to only compile the code
> as required:
> - make INTERVAL_TREE a config option
> - make INTERVAL_TREE_TEST select the library functions
> and sanitize the filenames & Makefile
> - prepare interval_tree for being built as a module if required
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Lespinasse <walken@google.com>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Andrea Arcangeli <aarcange@redhat.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
[snip]
> diff --git a/lib/interval_tree.c b/lib/interval_tree.c
> index e6eb406f2d65..e4109f624e51 100644
> --- a/lib/interval_tree.c
> +++ b/lib/interval_tree.c
> @@ -1,6 +1,7 @@
> #include <linux/init.h>
> #include <linux/interval_tree.h>
> #include <linux/interval_tree_generic.h>
> +#include <linux/module.h>
>
> #define START(node) ((node)->start)
> #define LAST(node) ((node)->last)
> @@ -8,3 +9,8 @@
> INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
> unsigned long, __subtree_last,
> START, LAST,, interval_tree)
> +
> +EXPORT_SYMBOL(interval_tree_insert);
> +EXPORT_SYMBOL(interval_tree_remove);
> +EXPORT_SYMBOL(interval_tree_iter_first);
> +EXPORT_SYMBOL(interval_tree_iter_next);
Hm, I've thought kernel coding style nowadays is to put the EXPORT_SYMBOL
right below the definition of the function?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-01-26 13:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 15:07 [PATCH 1/3] lib: Always build and export interval_tree Chris Wilson
2014-01-21 15:07 ` [PATCH 2/3] drm/i915: Do not call retire_requests from wait_for_rendering Chris Wilson
2014-01-21 15:07 ` [PATCH 3/3] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl Chris Wilson
2014-01-22 9:46 ` [PATCH] " Chris Wilson
2014-01-24 9:00 ` Chris Wilson
2014-01-27 17:56 ` Volkin, Bradley D
2014-01-27 18:09 ` Chris Wilson
2014-01-25 4:42 ` [PATCH 1/3] lib: Always build and export interval_tree Michel Lespinasse
2014-01-26 11:27 ` Chris Wilson
2014-01-26 11:58 ` Michel Lespinasse
2014-01-26 12:25 ` Chris Wilson
2014-01-26 12:24 ` [PATCH] lib: Export interval_tree Chris Wilson
2014-01-26 12:34 ` Michel Lespinasse
2014-01-26 13:54 ` Daniel Vetter [this message]
2014-01-26 14:03 ` [Intel-gfx] " Michel Lespinasse
2014-01-27 23:13 ` Andrew Morton
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=20140126135444.GR9772@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=a.p.zijlstra@chello.nl \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=walken@google.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