mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marek Belisko <marek.belisko@open-nandra.com>
To: barebox@lists.infradead.org
Cc: Marek Belisko <marek.belisko@open-nandra.com>
Subject: [PATCH 1/2] mtd: core: Fix compilation warning.
Date: Thu, 22 Mar 2012 22:05:17 +0100	[thread overview]
Message-ID: <1332450318-26079-1-git-send-email-marek.belisko@open-nandra.com> (raw)

Fix following warning:
drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:122:24: warning: unused variable 'ecc'

Found in at91rm9200ek_defconfig.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/mtd/core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index ccc5c26..e11ba64 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -119,7 +119,6 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 	int ret = 0;
 	struct mtd_info *mtd = cdev->priv;
 	struct mtd_info_user *user = buf;
-	struct mtd_ecc_stats *ecc = buf;
 	struct region_info_user *reg = buf;
 
 	switch (request) {
@@ -146,6 +145,8 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 		break;
 #if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
 	case ECCGETSTATS:
+		struct mtd_ecc_stats *ecc = buf;
+
 		ecc->corrected = mtd->ecc_stats.corrected;
 		ecc->failed = mtd->ecc_stats.failed;
 		ecc->badblocks = mtd->ecc_stats.badblocks;
-- 
1.7.5.4


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

             reply	other threads:[~2012-03-22 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 21:05 Marek Belisko [this message]
2012-03-22 21:05 ` [PATCH 2/2] pxa27x_udc: " Marek Belisko
2012-03-23  8:30   ` Sascha Hauer
2012-03-23  8:28 ` [PATCH 1/2] mtd: core: " Sascha Hauer
2012-03-23  8:31   ` Belisko Marek

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=1332450318-26079-1-git-send-email-marek.belisko@open-nandra.com \
    --to=marek.belisko@open-nandra.com \
    --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