diff mbox

[U-Boot] spl: spl_mmc: Minor cosmetics

Message ID 1433350131-1465-1-git-send-email-contact@paulk.fr
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Paul Kocialkowski June 3, 2015, 4:48 p.m. UTC
This switches some printf calls to puts and avoids a test repetition.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 common/spl/spl_mmc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Tom Rini June 18, 2015, 10:45 p.m. UTC | #1
On Wed, Jun 03, 2015 at 06:48:51PM +0200, Paul Kocialkowski wrote:

> This switches some printf calls to puts and avoids a test repetition.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index de495c0..f5ac844 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -43,13 +43,12 @@  static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
 					  (void *) spl_image.load_addr);
 
 end:
+	if (count == 0) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-	if (count == 0)
-		printf("spl: mmc block read error\n");
+		puts("spl: mmc block read error\n");
 #endif
-
-	if (count == 0)
 		return -1;
+	}
 
 	return 0;
 }
@@ -63,7 +62,7 @@  static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
 	err = get_partition_info(&mmc->block_dev, partition, &info);
 	if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-		printf("spl: partition error\n");
+		puts("spl: partition error\n");
 #endif
 		return -1;
 	}
@@ -83,7 +82,7 @@  static int mmc_load_image_raw_os(struct mmc *mmc)
 		(void *) CONFIG_SYS_SPL_ARGS_ADDR);
 	if (count == 0) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-		printf("spl: mmc block read error\n");
+		puts("spl: mmc block read error\n");
 #endif
 		return -1;
 	}