drm: Partially sync drm_mm.c with Linux 4.7.10
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sat, 5 Jan 2019 20:56:07 +0000 (21:56 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sat, 5 Jan 2019 20:56:31 +0000 (21:56 +0100)
sys/dev/drm/drm_mm.c
sys/dev/drm/include/drm/drm_mm.h

index 06926aa..451dc86 100644 (file)
@@ -139,6 +139,14 @@ int drm_mm_pre_get(struct drm_mm *mm)
  * some basic allocator dumpers for debugging.
  */
 
+static struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_mm *mm,
+                                               u64 size,
+                                               unsigned alignment,
+                                               unsigned long color,
+                                               u64 start,
+                                               u64 end,
+                                               enum drm_mm_search_flags flags);
+
 static void drm_mm_insert_helper(struct drm_mm_node *hole_node,
                                 struct drm_mm_node *node,
                                 u64 size, unsigned alignment,
@@ -526,7 +534,7 @@ struct drm_mm_node *drm_mm_search_free_generic(const struct drm_mm *mm,
        return best;
 }
 
-struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_mm *mm,
+static struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_mm *mm,
                                                        u64 size,
                                                        unsigned alignment,
                                                        unsigned long color,
index 8738795..b2576d6 100644 (file)
@@ -310,13 +310,7 @@ extern struct drm_mm_node *drm_mm_search_free_generic(const struct drm_mm *mm,
                                                unsigned alignment,
                                                unsigned long color,
                                                enum drm_mm_search_flags flags);
-extern struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_mm *mm,
-                                               u64 size,
-                                               unsigned alignment,
-                                               unsigned long color,
-                                               u64 start,
-                                               u64 end,
-                                               enum drm_mm_search_flags flags);
+
 static inline struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
                                                     unsigned long size,
                                                     unsigned alignment,
@@ -324,17 +318,6 @@ static inline struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
 {
        return drm_mm_search_free_generic(mm,size, alignment, 0, flags);
 }
-static inline  struct drm_mm_node *drm_mm_search_free_in_range(
-                                               const struct drm_mm *mm,
-                                               unsigned long size,
-                                               unsigned alignment,
-                                               unsigned long start,
-                                               unsigned long end,
-                                               enum drm_mm_search_flags flags)
-{
-       return drm_mm_search_free_in_range_generic(mm, size, alignment, 0,
-                                                  start, end, flags);
-}
 
 extern int drm_mm_pre_get(struct drm_mm *mm);