Skip to contentSkip to conversation

x86_64: arch_pick_mmap_layout() fixlet

PATCH New Alexey Dobriyan 1 participant 1 message Jun 28, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: arch_pick_mmap_layout() fixlet

sparse now warns about
arch/x86_64/mm/mmap.c:15:3: warning: returning void-valued expression

Generated code looks correct: there is jump to the end of arch_pick_mmap_layout() after ia32_pick_mmap_layout(), but this should be fixed regardless.

---

 arch/x86_64/mm/mmap.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/x86_64/mm/mmap.c +4 -2
@@ -11,8 +11,10 @@
 void arch_pick_mmap_layout(struct mm_struct *mm)
 {
 #ifdef CONFIG_IA32_EMULATION
-	if (current_thread_info()->flags & _TIF_IA32)
-		return ia32_pick_mmap_layout(mm);
+	if (current_thread_info()->flags & _TIF_IA32) {
+		ia32_pick_mmap_layout(mm);
+		return;
+	}
 #endif
 	mm->mmap_base = TASK_UNMAPPED_BASE;
 	if (current->flags & PF_RANDOMIZE) {