Remove redundant check for CONFIG_MMU

Previous thread: squashfs: fix potential buffer over-run on 4K block file systems by Linux Kernel Mailing List on Tuesday, April 27, 2010 - 9:59 am. (1 message)

Next thread: arch/avr32: fix build failure caused by wrong prototype by Linux Kernel Mailing List on Tuesday, April 27, 2010 - 4:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Tuesday, April 27, 2010 - 4:59 pm

Gitweb:     http://git.kernel.org/linus/16a5b3c4143fc7f6cbe0ef9fd4e9a58376f91506
Commit:     16a5b3c4143fc7f6cbe0ef9fd4e9a58376f91506
Parent:     bc113f151a73cb2195c2fb40d7d70acf8e2f9208
Author:     Christoph Egger <siccegge@cs.fau.de>
AuthorDate: Mon Apr 26 15:56:36 2010 +0100
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue Apr 27 09:01:26 2010 -0700

    Remove redundant check for CONFIG_MMU
    
    The checks for CONFIG_MMU at this location are duplicated as all the code is
    located inside a #ifndef CONFIG_MMU block. So the first conditional block will
    always be included while the second never will.
    
    Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 fs/binfmt_elf_fdpic.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 7ab23e0..2c5f9a0 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1005,15 +1005,8 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(
 				}
 			} else if (!mm->start_data) {
 				mm->start_data = seg->addr;
-#ifndef CONFIG_MMU
 				mm->end_data = seg->addr + phdr->p_memsz;
-#endif
 			}
-
-#ifdef CONFIG_MMU
-			if (seg->addr + phdr->p_memsz > mm->end_data)
-				mm->end_data = seg->addr + phdr->p_memsz;
-#endif
 		}
 
 		seg++;
--

Previous thread: squashfs: fix potential buffer over-run on 4K block file systems by Linux Kernel Mailing List on Tuesday, April 27, 2010 - 9:59 am. (1 message)

Next thread: arch/avr32: fix build failure caused by wrong prototype by Linux Kernel Mailing List on Tuesday, April 27, 2010 - 4:59 pm. (1 message)