linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] MXS: Fix GCC4.7 complaint in mxs-i2c
Date: Tue,  1 May 2012 04:00:21 +0200	[thread overview]
Message-ID: <1335837621-14816-5-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1335837621-14816-1-git-send-email-marex@denx.de>

drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer':
drivers/i2c/busses/i2c-mxs.c:253:8: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/i2c/busses/i2c-mxs.c:243:6: note: 'data' was declared here

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
CC: Dong Aisheng <b29396@freescale.com>
CC: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Linux ARM kernel <linux-arm-kernel@lists.infradead.org>
Cc: linux-i2c at vger.kernel.org
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Shawn Guo <shawn.guo@linaro.org>
Cc: Stefano Babic <sbabic@denx.de>
CC: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/i2c/busses/i2c-mxs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 7491194..89ea19d 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -240,7 +240,7 @@ static int mxs_i2c_wait_for_data(struct mxs_i2c_dev *i2c)
 
 static int mxs_i2c_finish_read(struct mxs_i2c_dev *i2c, u8 *buf, int len)
 {
-	u32 data;
+	u32 data = 0;
 	int i;
 
 	for (i = 0; i < len; i++) {
-- 
1.7.10

  parent reply	other threads:[~2012-05-01  2:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01  2:00 [PATCH 0/4] MXS: I2C improvements Marek Vasut
2012-05-01  2:00 ` [PATCH 1/4] MXS: Allow passing i2c bus speed via platform data Marek Vasut
2012-05-01  2:00 ` [PATCH 2/4] MXS: Set I2C timing registers for mxs-i2c Marek Vasut
2012-05-01  2:00 ` [PATCH 3/4] MXS: Implement DMA support into mxs-i2c Marek Vasut
2012-05-01  2:00 ` Marek Vasut [this message]
2012-05-01  2:05 ` [PATCH 0/4] MXS: I2C improvements Marek Vasut
2012-05-09 18:33 ` Marek Vasut
2012-05-10  7:35   ` Shawn Guo
2012-05-10 11:17     ` Marek Vasut
2012-05-10 14:37       ` Shawn Guo
2012-05-12 11:36   ` 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=1335837621-14816-5-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).