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/idr.h: Update ida_...



details:   https://anonhg.NetBSD.org/src/rev/c4725cc2954f
branches:  trunk
changeset: 372028:c4725cc2954f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Oct 25 23:36:32 2022 +0000

description:
linux/idr.h: Update ida_* API.

diffstat:

 sys/external/bsd/drm2/include/linux/idr.h |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 857a93685a3f -r c4725cc2954f sys/external/bsd/drm2/include/linux/idr.h
--- a/sys/external/bsd/drm2/include/linux/idr.h Tue Oct 25 23:36:21 2022 +0000
+++ b/sys/external/bsd/drm2/include/linux/idr.h Tue Oct 25 23:36:32 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: idr.h,v 1.9 2021/12/19 01:15:21 riastradh Exp $        */
+/*     $NetBSD: idr.h,v 1.10 2022/10/25 23:36:32 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 }
 
 static inline void
-ida_remove(struct ida *ida, int id)
+ida_free(struct ida *ida, int id)
 {
 
        idr_remove(&ida->ida_idr, id);
@@ -118,12 +118,19 @@
        return id;
 }
 
+static inline int
+ida_alloc_max(struct ida *ida, unsigned max, gfp_t gfp)
+{
+
+       return ida_simple_get(ida, 0, max + 1, gfp);
+}
+
 static inline void
 ida_simple_remove(struct ida *ida, unsigned int id)
 {
 
        KASSERT((int)id >= 0);
-       ida_remove(ida, id);
+       ida_free(ida, id);
 }
 
 #endif  /* _LINUX_IDR_H_ */



Home | Main Index | Thread Index | Old Index