[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 6/8] lib: move rbtree code


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 9 Dec 2020 14:18:44 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X767IjoWUE1hrzjhIkzCnpM5+Falf9ZjrrY8OUWElO8=; b=JdVaQ8YCnflHLlmWbRK+mv1J2leV+F89c9sX3CoLeY7lX9TLm4fS/M/VHzl6GT4F2T/nHoHw/Nt5Jom1fFdBoluW7UEa+OsYhFVIjNMzm+SdxmiQyT0rr1QgqnHeb5iqEqOj5Ouq1+N12OlB9ws7ys8NSFL6AgNeoA01Balx/tuibxpVPUbD2TlBosjLVS4SfffjahnwaiFKSLz7Qqc21NShyza8PSjXW3bPa7nFAOFtdTA5h6qUfEvZmoy7Y4+uNRM58OG3odUs6zRxvb4RflHSrqiOpTFONvc+feMrOw5JtpBNmdC52TaqZ6agiqB+vDIoSih7/fPmk0PmvUiDvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A3x7stLqIkuDWhYGIqOV6Yk3PRgS4dk66S7xklGHnqvDlh5qlB5iwV8lyL+j5iNC3vHsUBISRyMdF3dOTMyEJoUxYllWpXmp5AEK9ZE7jI9eC2Qul0IAZ/FQK4lh931tUHwxxgS5VIDFLYsckaVmKc+lgbUPfB7hdgpSj46oWXVk6mIN/1lhyV5DIObVsDZhuR012HquRKjS7C7qryNVKvsS3OvXuqeKHI/epZA3jQq08ZdEZzZHLdbQS5R3gHLirIcc453t2uQVSIX15NGxa4XL8JicCd/vw65+sxiyA2uZpr5Sanl27KT/vr/sLBT/LdhMZlh4/hCiIEv3KaUlRQ==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 09 Dec 2020 14:18:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWway2iTIGxXspY0WlIcuHoV7Fs6nu6Q0A
  • Thread-topic: [PATCH v3 6/8] lib: move rbtree code

Hi,

> On 23 Nov 2020, at 15:23, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> Build this code into an archive, which results in not linking it into
> x86 final binaries. This saves about 1.5k of dead code.
> 
> While moving the source file, take the opportunity and drop the
> pointless EXPORT_SYMBOL() and an instance of trailing whitespace.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> xen/common/Makefile          | 1 -
> xen/lib/Makefile             | 1 +
> xen/{common => lib}/rbtree.c | 9 +--------
> 3 files changed, 2 insertions(+), 9 deletions(-)
> rename xen/{common => lib}/rbtree.c (98%)
> 
> diff --git a/xen/common/Makefile b/xen/common/Makefile
> index 332e7d667cec..d65c9fe9cb4e 100644
> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -33,7 +33,6 @@ obj-y += preempt.o
> obj-y += random.o
> obj-y += rangeset.o
> obj-y += radix-tree.o
> -obj-y += rbtree.o
> obj-y += rcupdate.o
> obj-y += rwlock.o
> obj-y += shutdown.o
> diff --git a/xen/lib/Makefile b/xen/lib/Makefile
> index 72c72fffecf2..b0fe8c72acf5 100644
> --- a/xen/lib/Makefile
> +++ b/xen/lib/Makefile
> @@ -4,3 +4,4 @@ lib-y += ctors.o
> lib-y += ctype.o
> lib-y += list-sort.o
> lib-y += parse-size.o
> +lib-y += rbtree.o
> diff --git a/xen/common/rbtree.c b/xen/lib/rbtree.c
> similarity index 98%
> rename from xen/common/rbtree.c
> rename to xen/lib/rbtree.c
> index 9f5498a89d4e..95e045d52461 100644
> --- a/xen/common/rbtree.c
> +++ b/xen/lib/rbtree.c
> @@ -25,7 +25,7 @@
> #include <xen/rbtree.h>
> 
> /*
> - * red-black trees properties:  http://en.wikipedia.org/wiki/Rbtree 
> + * red-black trees properties:  http://en.wikipedia.org/wiki/Rbtree
>  *
>  *  1) A node is either red or black
>  *  2) The root is black
> @@ -223,7 +223,6 @@ void rb_insert_color(struct rb_node *node, struct rb_root 
> *root)
>               }
>       }
> }
> -EXPORT_SYMBOL(rb_insert_color);
> 
> static void __rb_erase_color(struct rb_node *parent, struct rb_root *root)
> {
> @@ -467,7 +466,6 @@ void rb_erase(struct rb_node *node, struct rb_root *root)
>       if (rebalance)
>               __rb_erase_color(rebalance, root);
> }
> -EXPORT_SYMBOL(rb_erase);
> 
> /*
>  * This function returns the first node (in sort order) of the tree.
> @@ -483,7 +481,6 @@ struct rb_node *rb_first(const struct rb_root *root)
>               n = n->rb_left;
>       return n;
> }
> -EXPORT_SYMBOL(rb_first);
> 
> struct rb_node *rb_last(const struct rb_root *root)
> {
> @@ -496,7 +493,6 @@ struct rb_node *rb_last(const struct rb_root *root)
>               n = n->rb_right;
>       return n;
> }
> -EXPORT_SYMBOL(rb_last);
> 
> struct rb_node *rb_next(const struct rb_node *node)
> {
> @@ -528,7 +524,6 @@ struct rb_node *rb_next(const struct rb_node *node)
> 
>       return parent;
> }
> -EXPORT_SYMBOL(rb_next);
> 
> struct rb_node *rb_prev(const struct rb_node *node)
> {
> @@ -557,7 +552,6 @@ struct rb_node *rb_prev(const struct rb_node *node)
> 
>       return parent;
> }
> -EXPORT_SYMBOL(rb_prev);
> 
> void rb_replace_node(struct rb_node *victim, struct rb_node *new,
>                    struct rb_root *root)
> @@ -574,4 +568,3 @@ void rb_replace_node(struct rb_node *victim, struct 
> rb_node *new,
>       /* Copy the pointers/colour from the victim to the replacement */
>       *new = *victim;
> }
> -EXPORT_SYMBOL(rb_replace_node);
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.