From: Wolfram Sang <w.sang@pengutronix.de>
To: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH (mmc-next) 2/3] mmc: fix a warning when compile the sdhci d.d. (V2)
Date: Tue, 28 Sep 2010 13:09:42 +0200 [thread overview]
Message-ID: <20100928110942.GE4441@pengutronix.de> (raw)
In-Reply-To: <1285663289-20283-2-git-send-email-peppe.cavallaro@st.com>
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
On Tue, Sep 28, 2010 at 10:41:28AM +0200, Giuseppe CAVALLARO wrote:
> This patch fixes a warning when compile the sdhci:
> pwr may be used uninitialized in sdhci_set_power
>
> Tested with the following compiler versions: 4.2.4 and 4.4.4
>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> drivers/mmc/host/sdhci.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 96c7f60..d3f924b 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1050,11 +1050,9 @@ out:
>
> static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
> {
> - u8 pwr;
> + u8 pwr = 0;
>
> - if (power == (unsigned short)-1)
> - pwr = 0;
> - else {
> + if (power != (unsigned short)-1) {
> switch (1 << power) {
> case MMC_VDD_165_195:
> pwr = SDHCI_POWER_180;
> --
> 1.5.5.6
>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-09-28 11:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 8:41 [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver (V3) Giuseppe CAVALLARO
2010-09-28 8:41 ` [PATCH (mmc-next) 2/3] mmc: fix a warning when compile the sdhci d.d. (V2) Giuseppe CAVALLARO
2010-09-28 8:41 ` [PATCH (mmc-next) 3/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm " Giuseppe CAVALLARO
2010-09-28 11:14 ` Wolfram Sang
2010-09-28 11:09 ` Wolfram Sang [this message]
2010-09-28 11:08 ` [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver (V3) Wolfram Sang
2010-09-30 23:25 ` Chris Ball
2010-10-01 7:07 ` Wolfram Sang
2010-10-04 5:36 ` Peppe CAVALLARO
2010-10-04 8:57 ` Wolfram Sang
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=20100928110942.GE4441@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=linux-mmc@vger.kernel.org \
--cc=peppe.cavallaro@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.