From patchwork Sat Nov 26 18:06:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 699534 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tR1f604Csz9t1F for ; Sun, 27 Nov 2016 05:28:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="0RY1vxTC"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAhgc-0004N9-Kk; Sat, 26 Nov 2016 18:26:54 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAhfZ-0001GX-6n for linux-mtd@bombadil.infradead.org; Sat, 26 Nov 2016 18:25:49 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAhOC-00025f-4e for linux-mtd@lists.infradead.org; Sat, 26 Nov 2016 18:07:53 +0000 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-11.nifty.com with ESMTP id uAQI6Uem018512; Sun, 27 Nov 2016 03:06:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com uAQI6Uem018512 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1480183606; bh=+3F6GSXexJs9GXwx5BOhfg8CC7NLtx+1m3VMkA3HNm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0RY1vxTCjrSfqA6MDei2X+KcjzfQViTN1/z6ZnyxvJJWuDp87qDtPa00SjWN5Zmlr 7drUTRuchZfAb8YUmOaXUblWuVtDojyHcJBdFUxx6bmIn9n6hYbj85GmAyeDKj1vrZ Lmvr2KVVikJeBVxJp/AQZ+B+jiyw33pkKgwKumyGuyW/LRMhvdMMQoKG7+XZfMmx9I 3w8BqekMOYhASLSRBbqF+OFVEtL9Ao65nnCC2Pi6uqD/w8ORTS9AIN9+yezutTasNR Zexwjwmcd4D8zUPOkK9C7ly2zuEGqdyp8L7vw8mjQYpmpFqxoTheEtDpNqYtrkHU2M RzCh5b97bUfFw== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH 16/39] mtd: nand: denali: rename handle_ecc() to denali_sw_ecc_fixup() Date: Sun, 27 Nov 2016 03:06:02 +0900 Message-Id: <1480183585-592-17-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480183585-592-1-git-send-email-yamada.masahiro@socionext.com> References: <1480183585-592-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161126_180752_894987_ADC22ABA X-CRM114-Status: GOOD ( 11.52 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_L4 RBL: Bad reputation (-4) [210.131.2.78 listed in bl.mailspike.net] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_BL Mailspike blacklisted X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Cyrille Pitchen , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org I am going to add HW_ECC_FIXUP capability in the next commit. Rename the software ECC handling function to denali_sw_ecc_fixup() for clarification. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index b577560..271b41a 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -903,8 +903,8 @@ static bool is_erased(u8 *buf, int len) #define ECC_ERR_DEVICE(x) (((x) & ERR_CORRECTION_INFO__DEVICE_NR) >> 8) #define ECC_LAST_ERR(x) ((x) & ERR_CORRECTION_INFO__LAST_ERR_INFO) -static bool handle_ecc(struct denali_nand_info *denali, u8 *buf, - u32 irq_status, unsigned int *max_bitflips) +static bool denali_sw_ecc_fixup(struct denali_nand_info *denali, u8 *buf, + u32 irq_status, unsigned int *max_bitflips) { bool check_erased_page = false; unsigned int bitflips = 0; @@ -1139,7 +1139,8 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip, memcpy(buf, denali->buf.buf, mtd->writesize); - check_erased_page = handle_ecc(denali, buf, irq_status, &max_bitflips); + check_erased_page = denali_sw_ecc_fixup(denali, buf, irq_status, + &max_bitflips); denali_enable_dma(denali, false); if (check_erased_page) {