Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3651892pxb; Mon, 24 Jan 2022 14:29:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1IvxUcjcOC4OLD6AQ7OPIEr7lDMOvJzor6oooiZ4nOdrx0BCNN7gYWXcuA1JsK05HVDJF X-Received: by 2002:a63:8649:: with SMTP id x70mr8809489pgd.530.1643063342343; Mon, 24 Jan 2022 14:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063342; cv=none; d=google.com; s=arc-20160816; b=YztrtsUplFk+n0eqdoCv98QpVxQV0I0xNqOYKonm2cX4D4emIarK2euoKoNTtu+85/ 8F/IMgzyFvwWDgix6VgWP2R3IFMspJa+Ufolgi0d6OkxTVt8F4WY4yVsz5Ka58heifvU zlAY2F0Imre/PhX47UixxmOf3ZYkWNYWLO6xwpQvrpsYR3263d1rFOtYyZQfU2NarD0c E+V0FWlsHySkDU9JJ+mhUXcoFm0oIsA04D0hynDI3C8M8ZeA4w1mZeabTRghOqDmnqcA aiQzbjdtjk2VxE9tGz3eo7Hfe4X2G07uwJPKuw5n32mZrLY3/cBKhpcLz5tQY9jm7lKc JWwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+Yg/ksYPvjVmN7wlt47mVjHE5F0UyGLcRL7FW0kdnTM=; b=v0Zu7EN0IhJHr4ul5rQFYXp9+wStAhXmYJRSDkulSlY9HPW18LzIwYtCjc6+JcnW4W IqUGo50vE0WtwgoJKngGdCFAPP1+SNG274bIPin0+x08n1KJQuxxdQ13xL8CYE7BfuT1 TyIT9hY2WNGZUXoAKq44nAhhv5nU3xtZTBQjTTn/ABKFLWg2Rj3zC+NGWmDApGPM2xxW SSiF5kNG3Fn/cAeIEqu76sPO77gf8XBGO2e91el4n8x+bSZavNDCLKE2EaJSdiqo1KU3 n0rm32t+rdrXwbMZBsFJdAQsreWCjDer43XHp+8Fb+4ngx6j+j6iLyfIDLim3+VDQpea svaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QTlOta8N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 83si7125694pgc.454.2022.01.24.14.28.50; Mon, 24 Jan 2022 14:29:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QTlOta8N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356234AbiAXWQ4 (ORCPT + 99 others); Mon, 24 Jan 2022 17:16:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390872AbiAXVM6 (ORCPT ); Mon, 24 Jan 2022 16:12:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76C86C06E001; Mon, 24 Jan 2022 12:10:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3F2A8B8119E; Mon, 24 Jan 2022 20:10:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D574C340E7; Mon, 24 Jan 2022 20:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055022; bh=iC3yFsiXLxji/n8wtnpCQ/0JmVUjZqt5fHAV9bJWQ+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QTlOta8NVYNDXdd6nveGwKO7Y9SgxTDv3u52ooSDWEtypOe0jgPFcIAriaFAgIizK zwf5uNtada/A2IixJJR65WAVYLmI+4+06MWqX09zGWYSYFonWoS9CfJLMBhOyYmTQG vpPPGV+hMfCEU1s31T9Sev3EKqfOw8a1nDr050as= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Miquel Raynal Subject: [PATCH 5.15 016/846] mtd: rawnand: davinci: Dont calculate ECC when reading page Date: Mon, 24 Jan 2022 19:32:13 +0100 Message-Id: <20220124184101.470672588@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil commit 71e89591502d737c10db2bd4d8fcfaa352552afb upstream. The function nand_davinci_read_page_hwecc_oob_first() does read the ECC data from the OOB area. Therefore it does not need to calculate the ECC as it is already available. Cc: # v5.2 Fixes: a0ac778eb82c ("mtd: rawnand: ingenic: Add support for the JZ4740") Signed-off-by: Paul Cercueil Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20211016132228.40254-1-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/davinci_nand.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -394,7 +394,6 @@ static int nand_davinci_read_page_hwecc_ int eccsteps = chip->ecc.steps; uint8_t *p = buf; uint8_t *ecc_code = chip->ecc.code_buf; - uint8_t *ecc_calc = chip->ecc.calc_buf; unsigned int max_bitflips = 0; /* Read the OOB area first */ @@ -420,8 +419,6 @@ static int nand_davinci_read_page_hwecc_ if (ret) return ret; - chip->ecc.calculate(chip, p, &ecc_calc[i]); - stat = chip->ecc.correct(chip, p, &ecc_code[i], NULL); if (stat == -EBADMSG && (chip->ecc.options & NAND_ECC_GENERIC_ERASED_CHECK)) {