Skip to contentSkip to conversation

Add /* never reached */ annotation

PATCH New Aron Griffis 1 participant 1 message Jan 9, 2008 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add /* never reached */ annotation

1 file changed, 2 insertions(+), 2 deletions(-)

arch/ia64/kernel/efi.c | 4 ++--

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.

arch/ia64/kernel/efi.c +2 -2
diff -r bc50f0946b69 -r bce918403f4c arch/ia64/kernel/efi.c
@@ -762,7 +762,7 @@ efi_mem_attribute (unsigned long phys_ad
 		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_a
 		if (!md || md->attribute != attr)
 			return 0;
 	} while (md);
-	return 0;
+	return 0;	/* never reached */
 }
 EXPORT_SYMBOL(kern_mem_attribute);