Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux linux: Fix rbtree node/e...
details: https://anonhg.NetBSD.org/src/rev/d65c4864435a
branches: trunk
changeset: 1028681:d65c4864435a
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:45:13 2021 +0000
description:
linux: Fix rbtree node/element confusion.
diffstat:
sys/external/bsd/drm2/include/linux/rbtree.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r 1e288408b758 -r d65c4864435a sys/external/bsd/drm2/include/linux/rbtree.h
--- a/sys/external/bsd/drm2/include/linux/rbtree.h Sun Dec 19 11:45:01 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/rbtree.h Sun Dec 19 11:45:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rbtree.h,v 1.12 2021/12/19 11:19:24 riastradh Exp $ */
+/* $NetBSD: rbtree.h,v 1.13 2021/12/19 11:45:13 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -69,9 +69,12 @@
}
static inline struct rb_node *
-rb_next2(struct rb_root *root, struct rb_node *rb)
+rb_next2(struct rb_root *root, struct rb_node *rbnode)
{
- return RB_TREE_NEXT(&root->rbr_tree, rb);
+ char *vnode = (char *)rbnode;
+
+ vnode -= root->rbr_tree.rbt_ops->rbto_node_offset;
+ return RB_TREE_NEXT(&root->rbr_tree, vnode);
}
static inline struct rb_node *
Home |
Main Index |
Thread Index |
Old Index