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 Provide and use an rb_ne...
details: https://anonhg.NetBSD.org/src/rev/fb6cacbc89e9
branches: trunk
changeset: 1028543:fb6cacbc89e9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:17:19 2021 +0000
description:
Provide and use an rb_next2 which takes a pointer to the tree as well
Easier for us to implement.
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h | 4 ++--
sys/external/bsd/drm2/include/linux/rbtree.h | 7 ++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r d0af9113edc1 -r fb6cacbc89e9 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Sun Dec 19 11:17:10 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Sun Dec 19 11:17:19 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_drv.h,v 1.39 2021/12/19 11:12:22 riastradh Exp $ */
+/* $NetBSD: i915_drv.h,v 1.40 2021/12/19 11:17:19 riastradh Exp $ */
/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
*/
@@ -1381,7 +1381,7 @@
#define for_each_uabi_engine(engine__, i915__) \
for ((engine__) = rb_to_uabi_engine(rb_first(&(i915__)->uabi_engines));\
(engine__); \
- (engine__) = rb_to_uabi_engine(rb_next(&(engine__)->uabi_node)))
+ (engine__) = rb_to_uabi_engine(rb_next2(&(i915__)->uabi_engines, &(engine__)->uabi_node)))
#define I915_GTT_OFFSET_NONE ((u32)-1)
diff -r d0af9113edc1 -r fb6cacbc89e9 sys/external/bsd/drm2/include/linux/rbtree.h
--- a/sys/external/bsd/drm2/include/linux/rbtree.h Sun Dec 19 11:17:10 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/rbtree.h Sun Dec 19 11:17:19 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rbtree.h,v 1.10 2021/12/19 11:16:32 riastradh Exp $ */
+/* $NetBSD: rbtree.h,v 1.11 2021/12/19 11:17:19 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -69,6 +69,11 @@
}
static inline struct rb_node *
+rb_next2(struct rb_root *root, struct rb_node *rb) {
+ return RB_TREE_NEXT(&root->rbr_tree, rb);
+}
+
+static inline struct rb_node *
rb_last(struct rb_root *root)
{
char *vnode = RB_TREE_MAX(&root->rbr_tree);
Home |
Main Index |
Thread Index |
Old Index