Skip to content

Commit

Permalink
[IA64] efi.c Add /* never reached */ annotation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aron Griffis authored and Tony Luck committed Feb 4, 2008
1 parent 965e7c8 commit 410ab51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 410ab51

Please sign in to comment.