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: 84278 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp541837qgi; Sat, 26 Nov 2016 10:09:33 -0800 (PST) X-Received: by 10.84.128.46 with SMTP id 43mr31140481pla.100.1480183773418; Sat, 26 Nov 2016 10:09:33 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q28si49451652pfl.44.2016.11.26.10.09.33; Sat, 26 Nov 2016 10:09:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753534AbcKZSJY (ORCPT + 25 others); Sat, 26 Nov 2016 13:09:24 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:48000 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753144AbcKZSIP (ORCPT ); Sat, 26 Nov 2016 13:08:15 -0500 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 Cc: Masahiro Yamada , linux-kernel@vger.kernel.org, Boris Brezillon , Marek Vasut , Brian Norris , Richard Weinberger , David Woodhouse , Cyrille Pitchen 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.7.4 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) {