[MTD] [NAND] S3C2410: Uninitialised variable cleanup

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Jun 8 07:59:01 EDT 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2612e523dc3695df319662ff279806a3d74de375
Commit:     2612e523dc3695df319662ff279806a3d74de375
Parent:     fb6ea3258742f41be8dd527ebd58a1a1e2cef23a
Author:     Nelson Castillo <arhuaco at freaks-unidos.net>
AuthorDate: Sun May 10 15:41:54 2009 -0500
Committer:  Ben Dooks <ben-linux at fluff.org>
CommitDate: Sat May 30 18:01:10 2009 +0100

    [MTD] [NAND] S3C2410: Uninitialised variable cleanup
    
    ~ Avoid warning without generating code.
      (I don't even get the warning without the macro uninitialized_var).
    
    Signed-off-by: Nelson Castillo <arhuaco at freaks-unidos.net>
    [ben-linux at fluff.org: subject cleanup]
    Signed-off-by: Ben Dooks <ben-linux at fluff.org>
---
 drivers/mtd/nand/s3c2410.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index daa4af9..7be3663 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -214,7 +214,7 @@ static int s3c2410_nand_setrate(struct s3c2410_nand_info *info)
 	int tacls_max = (info->cpu_type == TYPE_S3C2412) ? 8 : 4;
 	int tacls, twrph0, twrph1;
 	unsigned long clkrate = clk_get_rate(info->clk);
-	unsigned long set, cfg, mask;
+	unsigned long uninitialized_var(set), cfg, uninitialized_var(mask);
 	unsigned long flags;
 
 	/* calculate the timing information for the controller */
@@ -264,9 +264,6 @@ static int s3c2410_nand_setrate(struct s3c2410_nand_info *info)
 		break;
 
 	default:
-		/* keep compiler happy */
-		mask = 0;
-		set = 0;
 		BUG();
 	}
 



More information about the linux-mtd-cvs mailing list