mmc: Print error code for mmc_complete_init failure
PATCH 14/20 mmc: Print error code for mmc_complete_init failure
From: Jagan Teki <[email protected]>
Print the error code for non-zero (failure case) instead of making debug statement without any condition, this usually gives proper clue in failure condition.
Log:
---
MMC: FSL_SDHC: 0mmc_init: -70, time 38
*** Warning - MMC init failed, using default environment
--- drivers/mmc/mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/mmc.c +3 -1
@@ -1751,7 +1751,9 @@ int mmc_init(struct mmc *mmc)if (!err) err =mmc_complete_init (mmc); -debug ("%s: %d, time %lu\n" , __func__, err,get_timer (start)); +if (err) +printf ("%s: %d, time %lu\n" , __func__, err,get_timer (start)); +return err; }
Signature · 1 line
1.9.1
PATCH 14/20 mmc: Print error code for mmc_complete_init failure
Hi,
Quoted 6 lines · Jagan Teki
From: Jagan Teki <[email protected]>
Print the error code for non-zero (failure case) instead of making debug statement without any condition, this usually gives proper clue in failure condition.
Quoted 8 lines
Log:
---
MMC:FSL_SDHC: 0mmc_init: -70, time 38
*** Warning - MMC init failed, using default environmentCc Jaehoon Chung <[email protected]>Signed-off-by Jagan Teki <[email protected]>
I didn't see the other patches..but i picked this patch on u-boot-mmc.
Applied on u-boot-mmc. Thanks!
Best Regards,
Jaehoon Chung
Quoted 20 lines
--- drivers/mmc/mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/mmc/mmc.c +3
-1@@ -1751,7 +1751,9 @@ int mmc_init(struct mmc *mmc)if (!err) err =mmc_complete_init (mmc); -debug ("%s: %d, time %lu\n" , __func__, err,get_timer (start)); +if (err) +printf ("%s: %d, time %lu\n" , __func__, err,get_timer (start)); +return err; }