From: Peppe CAVALLARO <peppe.cavallaro@st.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH (mmc-next) 3/3] mmc: fix a warning when compile the sdhci d.d.
Date: Mon, 27 Sep 2010 14:57:47 +0200 [thread overview]
Message-ID: <4CA094CB.1060209@st.com> (raw)
In-Reply-To: <20100927105413.GE2664@pengutronix.de>
Hi Wolfram,
On 09/27/2010 12:54 PM, Wolfram Sang wrote:
> On Thu, Sep 23, 2010 at 11:14:26AM +0200, Giuseppe CAVALLARO wrote:
>> This patch fixes a warning when compile the sdhci:
>> pwr may be used uninitialized in sdhci_set_power
>> Also removes some include files that live in sdhci.h
>> header file.
>>
>> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>
> Okay for the set_power-part (what compiler are you using? Newer one
I tried with both 4.2.4 and 4.4.4 without any problems.
> should detect that BUG never returns). The include-removal could be in a
> seperate patch, not sure if it is worth, though.
It can include in a separate patch.
It makes sense if apply the previous patch to split the header file
because we remove duplicated include files.
Regards,
Peppe
>
>> ---
>> drivers/mmc/host/sdhci.c | 11 ++---------
>> 1 files changed, 2 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index 5928b0a..058dacd 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -18,13 +18,8 @@
>> #include <linux/io.h>
>> #include <linux/dma-mapping.h>
>> #include <linux/slab.h>
>> -#include <linux/scatterlist.h>
>> #include <linux/regulator/consumer.h>
>>
>> -#include <linux/leds.h>
>> -
>> -#include <linux/mmc/host.h>
>> -
>> #include "sdhci.h"
>>
>> #define DRIVER_NAME "sdhci"
>> @@ -1050,11 +1045,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
>>
>> --
>> 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
>
next prev parent reply other threads:[~2010-09-27 12:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 9:14 [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver Giuseppe CAVALLARO
2010-09-23 9:14 ` [PATCH (mmc-next) 2/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm d.d Giuseppe CAVALLARO
2010-09-23 9:14 ` [PATCH (mmc-next) 3/3] mmc: fix a warning when compile the sdhci d.d Giuseppe CAVALLARO
2010-09-27 10:54 ` Wolfram Sang
2010-09-27 12:57 ` Peppe CAVALLARO [this message]
2010-09-27 14:17 ` Wolfram Sang
2010-09-27 10:43 ` [PATCH (mmc-next) 2/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm d.d Wolfram Sang
2010-09-27 12:57 ` Peppe CAVALLARO
2010-09-27 14:13 ` Wolfram Sang
2010-09-27 14:20 ` Peppe CAVALLARO
2010-09-27 14:30 ` Wolfram Sang
2010-09-24 5:54 ` [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver Peppe CAVALLARO
2010-09-24 9:04 ` Wolfram Sang
2010-09-24 9:49 ` Peppe CAVALLARO
2010-09-27 10:37 ` Wolfram Sang
2010-09-27 12:57 ` Peppe CAVALLARO
2010-09-27 13:24 ` Peppe CAVALLARO
2010-09-27 14:15 ` Wolfram Sang
2010-09-27 14:25 ` Peppe CAVALLARO
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=4CA094CB.1060209@st.com \
--to=peppe.cavallaro@st.com \
--cc=linux-mmc@vger.kernel.org \
--cc=w.sang@pengutronix.de \
/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.