From patchwork Fri Sep 30 10:13:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 117070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 6DCE8B6F7E for ; Fri, 30 Sep 2011 20:13:42 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0798F2854D; Fri, 30 Sep 2011 12:13:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YJsSLTBnCecl; Fri, 30 Sep 2011 12:13:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22E0A2853A; Fri, 30 Sep 2011 12:13:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3D57D28537 for ; Fri, 30 Sep 2011 12:13:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DvgCFPhFOmDe for ; Fri, 30 Sep 2011 12:13:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 0A9BD2852B for ; Fri, 30 Sep 2011 12:13:31 +0200 (CEST) Received: by bkaq10 with SMTP id q10so1696195bka.3 for ; Fri, 30 Sep 2011 03:13:31 -0700 (PDT) Received: by 10.204.154.150 with SMTP id o22mr7618732bkw.363.1317377610956; Fri, 30 Sep 2011 03:13:30 -0700 (PDT) Received: from mashiro.kolej.mff.cuni.cz (vasut.kolej.mff.cuni.cz. [78.128.198.52]) by mx.google.com with ESMTPS id w3sm4403952bkp.10.2011.09.30.03.13.30 (version=SSLv3 cipher=OTHER); Fri, 30 Sep 2011 03:13:30 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Fri, 30 Sep 2011 12:13:22 +0200 Message-Id: <1317377606-9830-1-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Cc: Scott Wood Subject: [U-Boot] [PATCH 1/5] GCC4.6: Squash warning in nand_bbt.c X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de nand_bbt.c: In function ‘search_bbt’: nand_bbt.c:465:6: warning: variable ‘bits’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut Cc: Scott Wood Acked-by: Mike Frysinger --- drivers/mtd/nand/nand_bbt.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 521ddde..ded652b 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -462,7 +462,7 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr { struct nand_chip *this = mtd->priv; int i, chips; - int bits, startblock, block, dir; + int startblock, block, dir; int scanlen = mtd->writesize + mtd->oobsize; int bbtblocks; int blocktopage = this->bbt_erase_shift - this->page_shift; @@ -486,9 +486,6 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr bbtblocks = mtd->size >> this->bbt_erase_shift; } - /* Number of bits for each erase block in the bbt */ - bits = td->options & NAND_BBT_NRBITS_MSK; - for (i = 0; i < chips; i++) { /* Reset version information */ td->version[i] = 0;