]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: Fix compilation warnings
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 2 Mar 2020 21:24:19 +0000 (16:24 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:04:25 +0000 (15:04 -0400)
Nothing terribly interesting here.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
include/linux/mmdebug.h
mm/mmap.c

index 48ed391c41d52582f3c3678319c693c711a93574..9d5852b07002d08cf0d55c473d390060b2d35f1b 100644 (file)
@@ -13,7 +13,7 @@ extern void dump_page(struct page *page, const char *reason);
 extern void __dump_page(struct page *page, const char *reason);
 void dump_vma(const struct vm_area_struct *vma);
 void dump_mm(const struct mm_struct *mm);
-#define CONFIG_DEBUG_VM
+#define CONFIG_DEBUG_VM 1
 #ifdef CONFIG_DEBUG_VM
 #define VM_BUG_ON(cond) BUG_ON(cond)
 #define VM_BUG_ON_PAGE(cond, page)                                     \
index bacaa5ad1cd688a76a8fd40d55fe5c2b7200f585..ce1aa98f8ea837fcf97d1d0d874610673ced1e14 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -58,7 +58,7 @@
 
 #include "internal.h"
 #define CONFIG_DEBUG_MAPLE_TREE
-#define CONFIG_DEBUG_VM_RB
+#define CONFIG_DEBUG_VM_RB 1
 extern void mt_validate(struct maple_tree *mt);
 
 #ifndef arch_mmap_check
@@ -386,6 +386,7 @@ static int browse_rb(struct mm_struct *mm)
 #if defined(CONFIG_DEBUG_MAPLE_TREE)
 extern void mt_dump(const struct maple_tree *mt);
 
+#if 0
 static void __vma_mt_dump(struct mm_struct *mm)
 {
        struct vm_area_struct *entry = NULL;
@@ -402,8 +403,10 @@ static void __vma_mt_dump(struct mm_struct *mm)
        }
        rcu_read_unlock();
 }
-/* Validate the maple tree
- *
+#endif
+
+/*
+ * Validate the maple tree
  */
 static void validate_mm_mt(struct mm_struct *mm,
                struct vm_area_struct *ignore)
@@ -487,7 +490,7 @@ static void validate_mm(struct mm_struct *mm)
 
        while (vma) {
                struct anon_vma *anon_vma = vma->anon_vma;
-               struct anon_vma_chain *avc;
+//             struct anon_vma_chain *avc;
 
 //             pr_cont("vma: %lu-%lu", vma->vm_start, vma->vm_end);
                if (anon_vma) {
@@ -702,6 +705,7 @@ munmap_vma_range(struct mm_struct *mm, unsigned long start, unsigned long len,
        return 0;
 }
 
+#if 0
 /* Private
  * clean_overlaps() - Call do_munmap if there exists any mapping within @start
  * to @end.  Sets @pprev to the previous entry or NULL if none exists.
@@ -728,6 +732,7 @@ static int clean_overlaps(struct mm_struct *mm, unsigned long start,
        }
        return 0;
 }
+#endif
 
 static unsigned long count_vma_pages_range(struct mm_struct *mm,
                unsigned long addr, unsigned long end)
@@ -2364,7 +2369,7 @@ found_highest:
                {
                        struct vm_area_struct *dv = mm->mmap;
                        while (dv) {
-                               printk("vma %px %llu-%llu\n", dv, dv->vm_start, dv->vm_end);
+                               printk("vma %px %lu-%lu\n", dv, dv->vm_start, dv->vm_end);
                                dv = dv->vm_next;
                        }
                }