public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Venu Byravarasu <vbyravarasu@nvidia.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Chaotian Jing <chaotian.jing@mediatek.com>,
	Wenkai Du <wenkai.du@intel.com>,
	Venu Byravarasu <vbyravarasu@nvidia.com>
Subject: RE: [PATCH 3/7] mmc: sdhci: Do not BUG on invalid vdd
Date: Fri, 27 Nov 2015 05:08:08 +0000	[thread overview]
Message-ID: <371b41d66a9240958bb337dc3937f9c9@bgmail103.nvidia.com> (raw)
In-Reply-To: <1448539250-18769-4-git-send-email-adrian.hunter@intel.com>



> -----Original Message-----
> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> owner@vger.kernel.org] 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@intel.com>
> ---
>  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.

> +			break;
>  		}
>  	}
> 
> --
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the
> body of a message to majordomo@vger.kernel.org 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.
-----------------------------------------------------------------------------------

  reply	other threads:[~2015-11-27  5:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 12:00 [PATCH 0/7] mmc: Some fixes Adrian Hunter
2015-11-26 12:00 ` [PATCH 1/7] mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400 Adrian Hunter
2015-11-26 12:00 ` [PATCH 2/7] mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPT Adrian Hunter
2015-11-26 12:00 ` [PATCH 3/7] mmc: sdhci: Do not BUG on invalid vdd Adrian Hunter
2015-11-27  5:08   ` Venu Byravarasu [this message]
2015-11-27 13:30     ` Ulf Hansson
2015-11-26 12:00 ` [PATCH 4/7] mmc: sdio: Fix invalid vdd in voltage switch power cycle Adrian Hunter
2015-11-26 12:00 ` [PATCH 5/7] mmc: sdhc: Fix DMA descriptor with zero data length Adrian Hunter
2015-11-27 13:28   ` Ulf Hansson
2015-11-26 12:00 ` [PATCH 6/7] mmc: sdhci: 64-bit DMA actually has 4-byte alignment Adrian Hunter
2015-11-26 12:00 ` [PATCH 7/7] mmc: sdhci: Fix sdhci_runtime_pm_bus_on/off() Adrian Hunter
2015-11-27 13:27 ` [PATCH 0/7] mmc: Some fixes Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=371b41d66a9240958bb337dc3937f9c9@bgmail103.nvidia.com \
    --to=vbyravarasu@nvidia.com \
    --cc=adrian.hunter@intel.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wenkai.du@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox