mtd: slram: fix unused variable warning

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jun 10 23:59:10 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ed491d2063d41a09a35c7db1a99fea88dbfcd7aa
Commit:     ed491d2063d41a09a35c7db1a99fea88dbfcd7aa
Parent:     29fe5732bef2ba3c785fcb4aa5ba7160ad8faba5
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Tue May 20 12:01:50 2014 -0700
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed May 28 00:05:24 2014 -0700

    mtd: slram: fix unused variable warning
    
      drivers/mtd/devices/slram.c: In function 'init_slram':
      drivers/mtd/devices/slram.c:283:6: warning: variable 'i' set but not used [-Wunused-but-set-variable]
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/devices/slram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index 5a5cd2a..2fc4957c 100644
--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -280,14 +280,11 @@ __setup("slram=", mtd_slram_setup);
 static int __init init_slram(void)
 {
 	char *devname;
-	int i;
 
 #ifndef MODULE
 	char *devstart;
 	char *devlength;
 
-	i = 0;
-
 	if (!map) {
 		E("slram: not enough parameters.\n");
 		return(-EINVAL);
@@ -314,6 +311,7 @@ static int __init init_slram(void)
 	}
 #else
 	int count;
+	int i;
 
 	for (count = 0; count < SLRAM_MAX_DEVICES_PARAMS && map[count];
 			count++) {



More information about the linux-mtd-cvs mailing list