Re: [PATCH V2 15/15] mmc: core: Don't print reset warning if reset is not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Adrian and Arend,

2015-02-09 10:47 GMT+01:00 Adrian Hunter <adrian.hunter@xxxxxxxxx>:
> On 09/02/15 11:33, Arend van Spriel wrote:
>> On 01/29/15 10:00, Adrian Hunter wrote:
>>> Check the error code for EOPNOTSUPP and do not print
>>> reset warning in that case.
>>>
>>> Signed-off-by: Adrian Hunter<adrian.hunter@xxxxxxxxx>
>>> ---
>>>   drivers/mmc/core/core.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
>>> index 392a150..d439bf0 100644
>>> --- a/drivers/mmc/core/core.c
>>> +++ b/drivers/mmc/core/core.c
>>> @@ -2368,7 +2368,8 @@ int mmc_hw_reset(struct mmc_host *host)
>>>       ret = host->bus_ops->reset(host);
>>>       mmc_bus_put(host);
>>>
>>> -    pr_warn("%s: tried to reset card\n", mmc_hostname(host));
>>> +    if (ret != -EOPNOTSUPP)
>>> +        pr_warn("%s: tried to reset card\n", mmc_hostname(host));
>>
>> Guess you don't want this message either if ret is zero.
>
> Thanks for your comment.
>
> I assumed the original author wants to see the message whenever reset is
> attempted, which is OK by me because it is on the recovery path i.e.
> hopefully rare. The EOPNOTSUPP case is consistent with the code further up
> which returns EOPNOTSUPP when there is no ->reset() callback.

Speaking as the original author, yes, this was the idea. Thank you for
this patch.

BR, Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux