Re: [PATCH 3/7] mmc: sdhci: Do not BUG on invalid vdd

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

 



On 27 November 2015 at 06:08, Venu Byravarasu <vbyravarasu@xxxxxxxxxx> wrote:
>
>
>> -----Original Message-----
>> From: linux-mmc-owner@xxxxxxxxxxxxxxx [mailto:linux-mmc-
>> owner@xxxxxxxxxxxxxxx] On Behalf Of Adrian Hunter
>> Sent: Thursday, November 26, 2015 5:31 PM
>> To: Ulf Hansson
>> Cc: linux-mmc; Jaehoon Chung; Chaotian Jing; Wenkai Du
>> Subject: [PATCH 3/7] mmc: sdhci: Do not BUG on invalid vdd
>>
>> The driver may not be able to set the power correctly but that is not a reason
>> to BUG().
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
>> ---
>>  drivers/mmc/host/sdhci.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index
>> 2b17cc1246ca..5f8b0766428c 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1299,7 +1299,10 @@ static void sdhci_set_power(struct sdhci_host
>> *host, unsigned char mode,
>>                       pwr = SDHCI_POWER_330;
>>                       break;
>>               default:
>> -                     BUG();
>> +                     WARN(1, "%s: Invalid vdd %#x\n",
>> +                          mmc_hostname(host->mmc), vdd);
>> +                     pwr = 0;
>
> As pwr is initialized to 0 during declaration, don't see a need for above statement.
> However agree with your point that BUG can be replaced with a warn message.
>

I have updated the patch accordingly and added Venu's reviewed-by tag.

Kind regards
Uffe


>> +                     break;
>>               }
>>       }
>>
>> --
>> 1.9.1
>>
>> --
>> 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
> -----------------------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and may contain
> confidential information.  Any unauthorized review, use, disclosure or distribution
> is prohibited.  If you are not the intended recipient, please contact the sender by
> reply email and destroy all copies of the original message.
> -----------------------------------------------------------------------------------
--
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