src/lib: Remove unnecessary code
Fix the following warnings detected by checkpatch.pl:
WARNING: break is not useful after a goto or return
WARNING: Statements terminations use 1 semicolon
WARNING: else is not generally useful after a break or return
WARNING: void function return statements are not generally useful
TEST=Build and run on Galileo Gen2
Change-Id: I6f095c4e9cb1ee4ff2ebdf095ef612e1a8393231
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18762
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/lib/imd.c b/src/lib/imd.c
index e3a3927..8f65fa8 100644
--- a/src/lib/imd.c
+++ b/src/lib/imd.c
@@ -439,7 +439,7 @@
size_t lg_root_size, size_t lg_entry_align,
size_t sm_root_size, size_t sm_entry_align)
{
- size_t sm_region_size;;
+ size_t sm_region_size;
const struct imd_entry *e;
struct imdr *imdr;
diff --git a/src/lib/jpeg.c b/src/lib/jpeg.c
index 06c9d7c..f06d490 100644
--- a/src/lib/jpeg.c
+++ b/src/lib/jpeg.c
@@ -417,7 +417,6 @@
break;
default:
return ERR_DEPTH_MISMATCH;
- break;
}
}
}
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 58c1a8a..128869b 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -166,7 +166,6 @@
void __attribute__((weak)) mirror_payload(struct prog *payload)
{
- return;
}
void payload_load(void)
diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c
index 806e7d7..419d0eb 100644
--- a/src/lib/ramtest.c
+++ b/src/lib/ramtest.c
@@ -120,9 +120,8 @@
post_code(0xea);
printk(BIOS_DEBUG, "\nDRAM did _NOT_ verify!\n");
return 1;
- } else {
- printk(BIOS_DEBUG, "\nDRAM range verified.\n");
}
+ printk(BIOS_DEBUG, "\nDRAM range verified.\n");
return 0;
}