[PATCH V2] mmc: display an error number to debug

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH V2] mmc: display an error number to debug

Jaehoon Chung
It's useful to know an error number when it's debugging.

Signed-off-by: Jaehoon Chung <[hidden email]>
Reviewed-by: Peng Fan <[hidden email]>
---
Changelog on V2
- Change from "put" to "printf" to fix build error
---
 drivers/mmc/mmc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index a47700e313cb..39682f9df1be 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2179,7 +2179,7 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
  err = mmc_execute_tuning(mmc,
  mwt->tuning);
  if (err) {
- pr_debug("tuning failed\n");
+ pr_debug("tuning failed : %d\n", err);
  goto error;
  }
  }
@@ -2200,7 +2200,7 @@ error:
  }
  }
 
- pr_err("unable to select a mode\n");
+ pr_err("unable to select a mode : %d\n", err);
 
  return -ENOTSUPP;
 }
@@ -2746,7 +2746,7 @@ static int mmc_power_on(struct mmc *mmc)
  int ret = regulator_set_enable(mmc->vmmc_supply, true);
 
  if (ret) {
- puts("Error enabling VMMC supply\n");
+ printf("Error enabling VMMC supply : %d\n", ret);
  return ret;
  }
  }
@@ -2762,7 +2762,7 @@ static int mmc_power_off(struct mmc *mmc)
  int ret = regulator_set_enable(mmc->vmmc_supply, false);
 
  if (ret) {
- pr_debug("Error disabling VMMC supply\n");
+ pr_debug("Error disabling VMMC supply : %d\n", ret);
  return ret;
  }
  }
@@ -2866,7 +2866,7 @@ retry:
 
  if (err) {
 #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
- pr_err("Card did not respond to voltage select!\n");
+ pr_err("Card did not respond to voltage select! : %d\n", err);
 #endif
  return -EOPNOTSUPP;
  }
--
2.29.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH V2] mmc: display an error number to debug

Stephen Warren-2
On 11/16/20 3:04 PM, Jaehoon Chung wrote:
> It's useful to know an error number when it's debugging.
>
> Signed-off-by: Jaehoon Chung <[hidden email]>
> Reviewed-by: Peng Fan <[hidden email]>
> ---
> Changelog on V2
> - Change from "put" to "printf" to fix build error

Note that v1 was already applied to u-boot-mmc/master, which is how I
noticed the original issue; you might need to send a patch with just the
delta between the two versions.
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH V2] mmc: display an error number to debug

Jaehoon Chung
On 11/18/20 12:31 AM, Stephen Warren wrote:

> On 11/16/20 3:04 PM, Jaehoon Chung wrote:
>> It's useful to know an error number when it's debugging.
>>
>> Signed-off-by: Jaehoon Chung <[hidden email]>
>> Reviewed-by: Peng Fan <[hidden email]>
>> ---
>> Changelog on V2
>> - Change from "put" to "printf" to fix build error
>
> Note that v1 was already applied to u-boot-mmc/master, which is how I
> noticed the original issue; you might need to send a patch with just the
> delta between the two versions.

Okay, I will prepare to send patch based on u-boot-mmc/master.
If Peng requests to send patch, i will do.

Thanks!

Best Regards,
Jeahoon Chung

>

Reply | Threaded
Open this post in threaded view
|

RE: [PATCH V2] mmc: display an error number to debug

Peng Fan-4
> Subject: Re: [PATCH V2] mmc: display an error number to debug
>
> On 11/18/20 12:31 AM, Stephen Warren wrote:
> > On 11/16/20 3:04 PM, Jaehoon Chung wrote:
> >> It's useful to know an error number when it's debugging.
> >>
> >> Signed-off-by: Jaehoon Chung <[hidden email]>
> >> Reviewed-by: Peng Fan <[hidden email]>
> >> ---
> >> Changelog on V2
> >> - Change from "put" to "printf" to fix build error
> >
> > Note that v1 was already applied to u-boot-mmc/master, which is how I
> > noticed the original issue; you might need to send a patch with just
> > the delta between the two versions.
>
> Okay, I will prepare to send patch based on u-boot-mmc/master.
> If Peng requests to send patch, i will do.

I'll take v2.

Thanks,
Peng.

>
> Thanks!
>
> Best Regards,
> Jeahoon Chung
>
> >

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH V2] mmc: display an error number to debug

Jaehoon Chung
On 11/18/20 9:45 AM, Peng Fan wrote:

>> Subject: Re: [PATCH V2] mmc: display an error number to debug
>>
>> On 11/18/20 12:31 AM, Stephen Warren wrote:
>>> On 11/16/20 3:04 PM, Jaehoon Chung wrote:
>>>> It's useful to know an error number when it's debugging.
>>>>
>>>> Signed-off-by: Jaehoon Chung <[hidden email]>
>>>> Reviewed-by: Peng Fan <[hidden email]>
>>>> ---
>>>> Changelog on V2
>>>> - Change from "put" to "printf" to fix build error
>>>
>>> Note that v1 was already applied to u-boot-mmc/master, which is how I
>>> noticed the original issue; you might need to send a patch with just
>>> the delta between the two versions.
>>
>> Okay, I will prepare to send patch based on u-boot-mmc/master.
>> If Peng requests to send patch, i will do.
>
> I'll take v2.

Thanks a lot!

Best Regards,
Jaehoon Chung

>
> Thanks,
> Peng.
>
>>
>> Thanks!
>>
>> Best Regards,
>> Jeahoon Chung
>>
>>>
>