]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] initrd: remove unused false condition for initrd_start
authorHenry Nestler <henry.ne@arcor.de>
Thu, 7 Dec 2006 04:37:45 +0000 (20:37 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 16:39:38 +0000 (08:39 -0800)
After LOADER_TYPE && INITRD_START are true, the short if-condition
for INITRD_START can never be false.

Remove unused code from the else condition.

Signed-off-by: Henry Nestler <henry.ne@arcor.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/frv/kernel/setup.c
arch/i386/kernel/setup.c
arch/m32r/kernel/setup.c
arch/m32r/mm/discontig.c
arch/sh/kernel/setup.c
arch/sh64/kernel/setup.c
arch/x86_64/kernel/setup.c

index a8c61dac1cee29185ee234cb913a680789cbdc13..1a5eb6c301c9b0e833d389953d76650eb70390fe 100644 (file)
@@ -947,7 +947,7 @@ static void __init setup_linux_memory(void)
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (low_top_pfn << PAGE_SHIFT)) {
                        reserve_bootmem(INITRD_START, INITRD_SIZE);
-                       initrd_start = INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
+                       initrd_start = INITRD_START + PAGE_OFFSET;
                        initrd_end = initrd_start + INITRD_SIZE;
                }
                else {
index 141041dde74d0c8fe91913b445b2d68626776aed..97bb869307bc9344a5bfe9ed30fed8595e06925b 100644 (file)
@@ -1162,8 +1162,7 @@ void __init setup_bootmem_allocator(void)
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
                        reserve_bootmem(INITRD_START, INITRD_SIZE);
-                       initrd_start =
-                               INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
+                       initrd_start = INITRD_START + PAGE_OFFSET;
                        initrd_end = initrd_start+INITRD_SIZE;
                }
                else {
index 0e7778be33ccc93503e5b28a4f902f01e13674b4..936205f7aba079284ad4ad82318850f13659b1b0 100644 (file)
@@ -196,9 +196,7 @@ static unsigned long __init setup_memory(void)
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
                        reserve_bootmem(INITRD_START, INITRD_SIZE);
-                       initrd_start = INITRD_START ?
-                               INITRD_START + PAGE_OFFSET : 0;
-
+                       initrd_start = INITRD_START + PAGE_OFFSET;
                        initrd_end = initrd_start + INITRD_SIZE;
                        printk("initrd:start[%08lx],size[%08lx]\n",
                                initrd_start, INITRD_SIZE);
index abb34ccd59862453a6c20265a8268fc58789d1ce..c7efdb0aefc5998768b0984137b035ce3f1cd7c3 100644 (file)
@@ -105,9 +105,7 @@ unsigned long __init setup_memory(void)
                if (INITRD_START + INITRD_SIZE <= PFN_PHYS(max_low_pfn)) {
                        reserve_bootmem_node(NODE_DATA(0), INITRD_START,
                                INITRD_SIZE);
-                       initrd_start = INITRD_START ?
-                               INITRD_START + PAGE_OFFSET : 0;
-
+                       initrd_start = INITRD_START + PAGE_OFFSET;
                        initrd_end = initrd_start + INITRD_SIZE;
                        printk("initrd:start[%08lx],size[%08lx]\n",
                                initrd_start, INITRD_SIZE);
index 696ca75752d9d73b51a3614cf46ffbe4064f9708..f8dd6b7bfab05439bc5623bb34ce22230669c06b 100644 (file)
@@ -332,8 +332,7 @@ void __init setup_arch(char **cmdline_p)
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
                        reserve_bootmem_node(NODE_DATA(0), INITRD_START+__MEMORY_START, INITRD_SIZE);
-                       initrd_start =
-                               INITRD_START ? INITRD_START + PAGE_OFFSET + __MEMORY_START : 0;
+                       initrd_start = INITRD_START + PAGE_OFFSET + __MEMORY_START;
                        initrd_end = initrd_start + INITRD_SIZE;
                } else {
                        printk("initrd extends beyond end of memory "
index ffb310e33cefbe505ba25521e7b50a2e5bb5d2d4..b9e7d54d7b8553d89d2c9988c561f4227d38d19b 100644 (file)
@@ -243,9 +243,7 @@ void __init setup_arch(char **cmdline_p)
                if (INITRD_START + INITRD_SIZE <= (PFN_PHYS(last_pfn))) {
                        reserve_bootmem_node(NODE_DATA(0), INITRD_START + __MEMORY_START, INITRD_SIZE);
 
-                       initrd_start =
-                         (long) INITRD_START ? INITRD_START + PAGE_OFFSET +  __MEMORY_START : 0;
-
+                       initrd_start = (long) INITRD_START + PAGE_OFFSET + __MEMORY_START;
                        initrd_end = initrd_start + INITRD_SIZE;
                } else {
                        printk("initrd extends beyond end of memory "
index fc944b5e8f4a6050612a0c9220c713e2f47d3a51..f12f266f3e98e286758662e400bfbbdc98417040 100644 (file)
@@ -471,8 +471,7 @@ void __init setup_arch(char **cmdline_p)
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
                        reserve_bootmem_generic(INITRD_START, INITRD_SIZE);
-                       initrd_start =
-                               INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
+                       initrd_start = INITRD_START + PAGE_OFFSET;
                        initrd_end = initrd_start+INITRD_SIZE;
                }
                else {