[IA64] efi.c Add /* never reached */ annotation
authorAron Griffis <aron@hp.com>
Wed, 9 Jan 2008 03:29:38 +0000 (22:29 -0500)
committerTony Luck <tony.luck@intel.com>
Mon, 4 Feb 2008 23:35:06 +0000 (15:35 -0800)
As written, this loop could be for (;;) instead of do while (md).  The tests
inside the loop always result in a return so the loop never terminates normally.

Signed-off-by: Aron Griffis <aron@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/efi.c

index 269f4f4..d59134d 100644 (file)
@@ -762,7 +762,7 @@ efi_mem_attribute (unsigned long phys_addr, unsigned long size)
                if (!md || (md->attribute & ~EFI_MEMORY_RUNTIME) != attr)
                        return 0;
        } while (md);
-       return 0;
+       return 0;       /* never reached */
 }
 
 u64
@@ -798,7 +798,7 @@ kern_mem_attribute (unsigned long phys_addr, unsigned long size)
                if (!md || md->attribute != attr)
                        return 0;
        } while (md);
-       return 0;
+       return 0;       /* never reached */
 }
 EXPORT_SYMBOL(kern_mem_attribute);