mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 05/10] mtd: peb: fix usage of uninitialized variable
Date: Wed, 23 Nov 2016 10:39:32 +0100	[thread overview]
Message-ID: <20161123093937.15711-5-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20161123093937.15711-1-s.hauer@pengutronix.de>

'read' is used in an error message but never assigned a value to. Remove
the variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/peb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/peb.c b/drivers/mtd/peb.c
index 639dc0e..73f90bb 100644
--- a/drivers/mtd/peb.c
+++ b/drivers/mtd/peb.c
@@ -252,7 +252,6 @@ retry:
 int mtd_peb_check_all_ff(struct mtd_info *mtd, int pnum, int offset, int len,
 			 int warn)
 {
-	size_t read;
 	int err;
 	void *buf;
 
@@ -263,8 +262,8 @@ int mtd_peb_check_all_ff(struct mtd_info *mtd, int pnum, int offset, int len,
 	err = mtd_peb_read(mtd, buf, pnum, offset, len);
 	if (err && !mtd_is_bitflip(err)) {
 		dev_err(&mtd->class_dev,
-			"error %d while reading %d bytes from PEB %d:%d, read %zd bytes\n",
-			err, len, pnum, offset, read);
+			"error %d while reading %d bytes from PEB %d:%d\n",
+			err, len, pnum, offset);
 		goto out;
 	}
 
-- 
2.10.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-11-23  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  9:39 [PATCH 01/10] ARM: socfpga: fix compiler warning Sascha Hauer
2016-11-23  9:39 ` [PATCH 02/10] nios2: Fix out of tree build Sascha Hauer
2016-11-23  9:39 ` [PATCH 03/10] nios2: Fix compiler warning Sascha Hauer
2016-11-23  9:39 ` [PATCH 04/10] globalvar: " Sascha Hauer
2016-11-23  9:39 ` Sascha Hauer [this message]
2016-11-23  9:39 ` [PATCH 06/10] mtd: peb: Fix format specifier Sascha Hauer
2016-11-23  9:39 ` [PATCH 07/10] ARM: socfpga: fix compiler warning Sascha Hauer
2016-11-23  9:39 ` [PATCH 08/10] of: Use %pa to print resource_size_t type Sascha Hauer
2016-11-23  9:39 ` [PATCH 09/10] menu: sanitize menu_add_title Sascha Hauer
2016-11-23  9:39 ` [PATCH 10/10] arm: at91 bootstrap: Fix menu title Sascha Hauer

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=20161123093937.15711-5-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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