From patchwork Thu Jun 10 13:49:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1490546 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jpuciedG; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G153h6mhYz9s1l for ; Thu, 10 Jun 2021 23:51:12 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SfQ9xEP0drK8NiE6mYT7JNrHMg/zyblfFV/5hqD/naQ=; b=jpuciedGLl5Yd/ s1UKRvOpdvfkvtiSZgTjjfxwi8v8NrzIPvUyJlTOmgY1AL0ia07mwyd/iO1ufqMT8lB6f37opX/K8 10xRvC7CAZDNpFmaaAidQIBLI3GDPHWv0g5c5O8OAZpscG3reabcTf8tzV2GuUQsdHB8Iz8U7cHj9 ZWO3+/Di1BmpFkzuGDTVyLoq2lmmg8p5pfKKAsUlYfwXTBcZ4c3gtK4SSnbKXE8HyzjmBx7fJKYZB nDBCGUB1ZzqvH7oP/uO2KXq8Mdl8X2tyoZ4MNO1YxoLheXyg+GL7d/tS0sonDDorAVLTDKvmwA/mV 1Bo6PCxaKCgDB5eonxiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrL4t-000z17-6J; Thu, 10 Jun 2021 13:50:35 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrL3Y-000yVQ-Pr for linux-mtd@lists.infradead.org; Thu, 10 Jun 2021 13:49:15 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 9F2F9240012; Thu, 10 Jun 2021 13:49:10 +0000 (UTC) From: Miquel Raynal To: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Cc: Thomas Petazzoni , ryan.barnett@collins.com, Miquel Raynal Subject: [PATCH 4/5] mtd: rawnand: omap: Various style fixes Date: Thu, 10 Jun 2021 15:49:05 +0200 Message-Id: <20210610134906.3503303-5-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610134906.3503303-1-miquel.raynal@bootlin.com> References: <20210610134906.3503303-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210610_064913_007456_F7A8BA15 X-CRM114-Status: GOOD ( 12.54 ) X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Fix the comments style, declare the variables in a reverse Christmas tree order, add an upper case character at the beginning of a sentence. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/raw/omap2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.230 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.178.230 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fix the comments style, declare the variables in a reverse Christmas tree order, add an upper case character at the beginning of a sentence. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/raw/omap2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c index 4b2ad77db71d..71cd659cd876 100644 --- a/drivers/mtd/nand/raw/omap2.c +++ b/drivers/mtd/nand/raw/omap2.c @@ -1524,8 +1524,8 @@ static int omap_write_page_bch(struct nand_chip *chip, const uint8_t *buf, int oob_required, int page) { struct mtd_info *mtd = nand_to_mtd(chip); - int ret; uint8_t *ecc_calc = chip->ecc.calc_buf; + int ret; ret = nand_prog_page_begin_op(chip, page, 0, NULL, 0); if (ret) @@ -1594,7 +1594,7 @@ static int omap_write_subpage_bch(struct nand_chip *chip, u32 offset, chip->legacy.write_buf(chip, buf, mtd->writesize); for (step = 0; step < ecc_steps; step++) { - /* mask ECC of un-touched subpages by padding 0xFF */ + /* Mask ECC of un-touched subpages with 0xFFs */ if (step < start_step || step > end_step) memset(ecc_calc, 0xff, ecc_bytes); else @@ -1607,8 +1607,10 @@ static int omap_write_subpage_bch(struct nand_chip *chip, u32 offset, ecc_calc += ecc_bytes; } - /* copy calculated ECC for whole page to chip->buffer->oob */ - /* this include masked-value(0xFF) for unwritten subpages */ + /* + * Copy the calculated ECC for the whole page including the + * masked values (0xFF) corresponding to unwritten subpages. + */ ecc_calc = chip->ecc.calc_buf; ret = mtd_ooblayout_set_eccbytes(mtd, ecc_calc, chip->oob_poi, 0, chip->ecc.total); @@ -1641,8 +1643,8 @@ static int omap_read_page_bch(struct nand_chip *chip, uint8_t *buf, struct mtd_info *mtd = nand_to_mtd(chip); uint8_t *ecc_calc = chip->ecc.calc_buf; uint8_t *ecc_code = chip->ecc.code_buf; - int stat, ret; unsigned int max_bitflips = 0; + int stat, ret; ret = nand_read_page_op(chip, page, 0, NULL, 0); if (ret)