diff mbox

mmc: trivial: fix the compiling warning

Message ID 003201ceda2a$a1546f70$e3fd4e50$%jun@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Seungwon Jeon Nov. 5, 2013, 1:26 p.m. UTC
Fixed the following warning.

drivers/mmc/core/mmc_ops.c:484:11: warning: 'status' may be used
uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
 drivers/mmc/core/mmc_ops.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jaehoon Chung Nov. 6, 2013, 3:20 a.m. UTC | #1
I known this patch is already included into Ulf's patchset.

mmc: core: Silence compiler warning in __mmc_switch

Best regards,
Jaehoon Chung

On 11/05/2013 10:26 PM, Seungwon Jeon wrote:
> Fixed the following warning.
> 
> drivers/mmc/core/mmc_ops.c:484:11: warning: 'status' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> 
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>  drivers/mmc/core/mmc_ops.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index aae8d8b..e5b5eeb 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -414,7 +414,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
>  	int err;
>  	struct mmc_command cmd = {0};
>  	unsigned long timeout;
> -	u32 status;
> +	u32 status = 0;
>  	bool ignore_crc = false;
>  
>  	BUG_ON(!card);
> 

--
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
Seungwon Jeon Nov. 6, 2013, 9:42 a.m. UTC | #2
On Wed, November 06, 2013, Jaehoon Chung wrote:
> I known this patch is already included into Ulf's patchset.
> 
> mmc: core: Silence compiler warning in __mmc_switch

Oh, good!

Thanks,
Seungwon Jeon
> 
> Best regards,
> Jaehoon Chung
> 
> On 11/05/2013 10:26 PM, Seungwon Jeon wrote:
> > Fixed the following warning.
> >
> > drivers/mmc/core/mmc_ops.c:484:11: warning: 'status' may be used
> > uninitialized in this function [-Wmaybe-uninitialized]
> >
> > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> > ---
> >  drivers/mmc/core/mmc_ops.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> > index aae8d8b..e5b5eeb 100644
> > --- a/drivers/mmc/core/mmc_ops.c
> > +++ b/drivers/mmc/core/mmc_ops.c
> > @@ -414,7 +414,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
> >  	int err;
> >  	struct mmc_command cmd = {0};
> >  	unsigned long timeout;
> > -	u32 status;
> > +	u32 status = 0;
> >  	bool ignore_crc = false;
> >
> >  	BUG_ON(!card);
> >
> 
> --
> 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

--
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
diff mbox

Patch

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index aae8d8b..e5b5eeb 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -414,7 +414,7 @@  int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
 	int err;
 	struct mmc_command cmd = {0};
 	unsigned long timeout;
-	u32 status;
+	u32 status = 0;
 	bool ignore_crc = false;
 
 	BUG_ON(!card);