]> err.no Git - linux-2.6/commitdiff
sh: Silence sq compile warning on sh4 nommu.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 25 Jul 2007 06:59:47 +0000 (15:59 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 26 Jul 2007 06:35:17 +0000 (15:35 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/sh4/sq.c

index b98d6c3e6f36c3edb9b70a2e3ae07a1ac802be0a..c21512c6044e790a815458b7833d48a7b7ce9639 100644 (file)
@@ -208,7 +208,6 @@ EXPORT_SYMBOL(sq_remap);
 void sq_unmap(unsigned long vaddr)
 {
        struct sq_mapping **p, *map;
-       struct vm_struct *vma;
        int page;
 
        for (p = &sq_mapping_list; (map = *p); p = &map->next)
@@ -225,11 +224,18 @@ void sq_unmap(unsigned long vaddr)
        bitmap_release_region(sq_bitmap, page, get_order(map->size));
 
 #ifdef CONFIG_MMU
-       vma = remove_vm_area((void *)(map->sq_addr & PAGE_MASK));
-       if (!vma) {
-               printk(KERN_ERR "%s: bad address 0x%08lx\n",
-                      __FUNCTION__, map->sq_addr);
-               return;
+       {
+               /*
+                * Tear down the VMA in the MMU case.
+                */
+               struct vm_struct *vma;
+
+               vma = remove_vm_area((void *)(map->sq_addr & PAGE_MASK));
+               if (!vma) {
+                       printk(KERN_ERR "%s: bad address 0x%08lx\n",
+                              __FUNCTION__, map->sq_addr);
+                       return;
+               }
        }
 #endif