From patchwork Sat May 30 17:41:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 27881 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 25AE9B7069 for ; Sun, 31 May 2009 18:57:07 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MAgnr-0004ut-Vm; Sun, 31 May 2009 08:54:03 +0000 Received: from aeryn.fluff.org.uk ([87.194.8.8] helo=teyla.home.fluff.org) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1MATF7-0000AA-8T for linux-mtd@lists.infradead.org; Sat, 30 May 2009 18:25:25 +0000 Received: from ben by teyla.home.fluff.org with local (Exim 4.69) (envelope-from ) id 1MASYs-0005gQ-JL; Sat, 30 May 2009 18:41:38 +0100 From: Ben Dooks To: linux-mtd@lists.infradead.org Subject: [MTD] [NAND] S3C2410: Uninitialised variable cleanup Date: Sat, 30 May 2009 18:41:32 +0100 Message-Id: <1243705298-21814-6-git-send-email-ben-linux@fluff.org> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1243705298-21814-5-git-send-email-ben-linux@fluff.org> References: <1243705298-21814-1-git-send-email-ben-linux@fluff.org> <1243705298-21814-2-git-send-email-ben-linux@fluff.org> <1243705298-21814-3-git-send-email-ben-linux@fluff.org> <1243705298-21814-4-git-send-email-ben-linux@fluff.org> <1243705298-21814-5-git-send-email-ben-linux@fluff.org> X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Sun, 31 May 2009 04:53:59 -0400 Cc: Nelson Castillo , Ben Dooks X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Nelson Castillo ~ Avoid warning without generating code. (I don't even get the warning without the macro uninitialized_var). Signed-off-by: Nelson Castillo [ben-linux@fluff.org: subject cleanup] Signed-off-by: Ben Dooks --- 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(); }