From patchwork Sat Jul 27 14:09:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 262450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 632572C0107 for ; Sun, 28 Jul 2013 00:11:22 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V35D4-00058D-Kw; Sat, 27 Jul 2013 14:11:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V35D3-0005l0-0b; Sat, 27 Jul 2013 14:11:01 +0000 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V35D1-0005kO-9b for linux-mtd@lists.infradead.org; Sat, 27 Jul 2013 14:11:00 +0000 Received: by mail-pd0-f171.google.com with SMTP id y14so3883216pdi.16 for ; Sat, 27 Jul 2013 07:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=LajHIZSaQ8ALCvqf+Mr0uHPJNdYim8HVntH64lRGi6Q=; b=bptniXdfDBwIp+f+h8F7LWUbtvmfXQrhE8uYHinrgTVvzZkThs6ClhlCI1iCcUttgm 8HPY9ob7xMXbLPLu+c9ftDaDy4Rj/oi4ntiBWNX5IdkWqfKBgYio98RN4O21N9/dnrRc HexdbPRZcYs6+LMDA2n6NO6+Nfss3ma+ctSmM/kFaVndJyEMY2cYNuocWeusIddRVT/h tdTA32NPGRB5QOc5v0dL9TUOJxwqOh/f+vfjoDqKCYn5y+2OmpZswaVLg/Lgnqjl2eGO KFwHaSWp7BiR6h5H5pp2+CJBa5OaE2YyiNVJC5ywog4WhWGzgfAmBU4mWIFMbg1fddvW kAeQ== X-Received: by 10.66.13.233 with SMTP id k9mr13632812pac.57.1374934237253; Sat, 27 Jul 2013 07:10:37 -0700 (PDT) Received: from localhost.localdomain (KD113145060135.ppp-bb.dion.ne.jp. [113.145.60.135]) by mx.google.com with ESMTPSA id ai6sm9808796pad.15.2013.07.27.07.10.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 27 Jul 2013 07:10:36 -0700 (PDT) From: Akinobu Mita To: linux-mtd@lists.infradead.org Subject: [PATCH] mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant Date: Sat, 27 Jul 2013 23:09:53 +0900 Message-Id: <1374934193-21236-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130727_101059_462924_36B1858E X-CRM114-Status: GOOD ( 11.43 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (akinobu.mita[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: David Woodhouse , Akinobu Mita , Artem Bityutskiy X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 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" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use NAND_CI_CELLTYPE_MSK to extract the cell type from nand_chip.cellinfo instead of hardcoded constant. Signed-off-by: Akinobu Mita Cc: Artem Bityutskiy Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Acked-by: Brian Norris --- drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 0c8bb6b..2ed2bb3 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1520,7 +1520,7 @@ int denali_init(struct denali_nand_info *denali) * so just let controller do 15bit ECC for MLC and 8bit ECC for * SLC if possible. * */ - if (denali->nand.cellinfo & 0xc && + if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK && (denali->mtd.oobsize > (denali->bbtskipbytes + ECC_15BITS * (denali->mtd.writesize / ECC_SECTOR_SIZE)))) {