Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2469316pxj; Mon, 10 May 2021 03:52:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR2ppf8twPIHNpqx+kqWpsLngSaK0GQhiQ2X3UTCtsAG71PkNhLc4ABVouuq/51OgSOFwX X-Received: by 2002:a17:906:7016:: with SMTP id n22mr24956653ejj.23.1620643936593; Mon, 10 May 2021 03:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620643936; cv=none; d=google.com; s=arc-20160816; b=ysmjwnMiaWREpi9EHcghR96HQCGypw8S1/5Gg6HWBRgtFYiFF32gP1604Y/ezKRJMj v7Jz8bKlI9GZ/wxIcy3yPbTqXIjRTsGTnkE81U+hyVC3Ugjo9A6ggazr6iMuQ4GBxkIY a6tIoF/R7CPD3+62wpRE12zoXoqDkF03FqBx2tHwSq50IalNbP9Ym5SNHpLfiPA8lVYO Ajur62viiWcfOVh9pk9sB2Z6/1xua+/1X560RHyzHhHX/9VvXoYpBc3hqNOha4CCa+iP /Gia/vA/qvfR21g6E7Zu+Mh/0jnLfKx9K86cRpKeOmtiGyln7SgJ4uJ++xYttuBtkhFN 1CsQ== 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=IbEnt4r1yS/ADSGFfYQz/hbj4dR0KB11a+aYDr+IV74=; b=rbxdQAZBOCoZLP6VFxYfDAt/tMm2Wkt85+eBsP3fyTlP/zNi2kyX/wb7UkQ4nRswai 301EBblYrO0kkDDeDjezKN9x1BFgL7gPCyaJWVaKUvMsWmt2D5koFKd5HpRGRs11TPib OW+SWM8hqf5WcZQZPdTgZp+ETATYrQUsoIHWXrtXKJGyX5sz3KW8ruB3xCpNo1j6XLXS 9GRTcwThYJyFprTzFyVLCou4NJ/rruSH50MDBcXjJFQORlzXvNLixf86VAbuDEooHRKP lZhEjfXywRT5OWE48fTe/8DduNmQ4NwzXGUnU6uzI8Y5tthPbPGGRZ+TbJjjDdIvCkhZ G6MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t7RBB7Qh; 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 a20si13661736edv.202.2021.05.10.03.51.53; Mon, 10 May 2021 03:52:16 -0700 (PDT) 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=t7RBB7Qh; 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 S231322AbhEJKvT (ORCPT + 99 others); Mon, 10 May 2021 06:51:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:49878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbhEJKlC (ORCPT ); Mon, 10 May 2021 06:41:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 251A961924; Mon, 10 May 2021 10:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642712; bh=59LsXGdZyP/PDtSD8U1o/gxSemZL1om5QmAcjhwY9Fc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t7RBB7QhRhu/l+k56klpRsVe3q3/viunJkjFUAee8gPU6r3bOfPpXLqZ9isBhDz1z LEe2lgtgMEhMSImr2oc5MtHTr9KKPLHhcokwGRk0U+Ug+eo4FmXC05s92e0f4XEIxu qpirsz9BlS4DMDotqOc/IecJRYPJvVr418MXM+ew= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Kai Stuhlemmer (ebee Engineering)" , Tudor Ambarus , Miquel Raynal Subject: [PATCH 5.10 021/299] mtd: rawnand: atmel: Update ecc_stats.corrected counter Date: Mon, 10 May 2021 12:16:58 +0200 Message-Id: <20210510102005.555397868@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@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: Kai Stuhlemmer (ebee Engineering) commit 33cebf701e98dd12b01d39d1c644387b27c1a627 upstream. Update MTD ECC statistics with the number of corrected bits. Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Cc: stable@vger.kernel.org Signed-off-by: Kai Stuhlemmer (ebee Engineering) Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210322150714.101585-1-tudor.ambarus@microchip.com Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/atmel/nand-controller.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -883,10 +883,12 @@ static int atmel_nand_pmecc_correct_data NULL, 0, chip->ecc.strength); - if (ret >= 0) + if (ret >= 0) { + mtd->ecc_stats.corrected += ret; max_bitflips = max(ret, max_bitflips); - else + } else { mtd->ecc_stats.failed++; + } databuf += chip->ecc.size; eccbuf += chip->ecc.bytes;