From patchwork Sun Nov 18 16:36:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 999513 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FzUz6nOJ"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="sRD3OQ21"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42yd0t28mMz9s5c for ; Mon, 19 Nov 2018 03:37:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+e1xlcaX1q321v5if1wWh6A5fSueqrpfy4wmvu2Kx5c=; b=FzUz6nOJ4zQ1nK 9xKj5+R2QlG5k20/ToAZTQ62Tn1MDXalmSVNGLrTXjCt8B/eeobTvb0G4NNLu52W3PcK9RrKAm+uy MMxa7UOTnTaEbAjRAcSQL2XnUa7J9Vd+6f1qUVTQAMdrzFLy12NXmdNMYfJU8+nQ+oviPVnLTKvT1 LVJs9qggFsJdztLGn1OteSiH4wEzE/uHG77gUUaGkHow7Lfd8pkWOd+KYSb+v0pWMplbrXZgpweIj B6CiwZ+/oIzG1Uxkt7AWZ+psdiNpoceTltvOlMnxmqCqR0EgjVtoI/hmokDvw3ELOXOYyrd4ry3oD Ya281WQqtvvgEEuwzn3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOQ4P-0006kQ-RC; Sun, 18 Nov 2018 16:37:13 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOQ4N-0006kJ-OO for linux-mtd@bombadil.infradead.org; Sun, 18 Nov 2018 16:37:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RYctNiRbW81QTmHoSBKUzH/gc6AiOOEByERi6PkcA/M=; b=sRD3OQ21T5pE3wurTeEnkduSAN BAyLdxF6tmvyE28WLg2N/efb5L1dHcorcTh+mFSnd18ZV2oXirZJ04CxaglKzgOUa79JRzV5MSj2n wJknIj+JLRi5KLoAYPZ7sUj6RmC1OEhVcJJOMGCZ+Ap5+tXxpU1mJHvgmu96eFGSi6O0pVDYtv51p p6VDQy7ax/klIVQXywvEWTNUEUgJqCQs0tu52YleXqlpNH1j81MJkNJLGsrJtQ5fg0aUSZVGK+dry rmIJwZik5oHz72T8FSnWh7JYleHaWtOZKw2iHVQAfBJFZJKgC13KR44IWlkVuPCdtLbC7BSZkBRmy heNv9sLw==; Received: from youngberry.canonical.com ([91.189.89.112]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOQ4K-0006KE-TR for linux-mtd@lists.infradead.org; Sun, 18 Nov 2018 16:37:10 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gOQ48-0000Zw-Pw; Sun, 18 Nov 2018 16:36:56 +0000 From: Colin King To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Subject: [PATCH] mtd: nftl: clean up indentation, remove extraneous tabs Date: Sun, 18 Nov 2018 16:36:56 +0000 Message-Id: <20181118163656.30698-1-colin.king@canonical.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181118_163708_957859_487D7734 X-CRM114-Status: GOOD ( 18.14 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-5.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [91.189.89.112 listed in list.dnswl.org] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Colin Ian King The hunk of code is indented too much by one level, fix this by removing the extraneous tabs. Also terminate block comment using the recommended coding style to clean up checkpatch warning. Signed-off-by: Colin Ian King --- drivers/mtd/nftlmount.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c index 91b7fb326f9a..334aa5b3a655 100644 --- a/drivers/mtd/nftlmount.c +++ b/drivers/mtd/nftlmount.c @@ -346,25 +346,26 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block) goto fail; } - /* increase and write Wear-Leveling info */ - nb_erases = le32_to_cpu(uci.WearInfo); - nb_erases++; - - /* wrap (almost impossible with current flash) or free block */ - if (nb_erases == 0) - nb_erases = 1; - - /* check the "freeness" of Erase Unit before updating metadata - * FixMe: is this check really necessary ? since we have check the - * return code after the erase operation. */ - if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0) - goto fail; - - uci.WearInfo = le32_to_cpu(nb_erases); - if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE + - 8, 8, &retlen, (char *)&uci) < 0) - goto fail; - return 0; + /* increase and write Wear-Leveling info */ + nb_erases = le32_to_cpu(uci.WearInfo); + nb_erases++; + + /* wrap (almost impossible with current flash) or free block */ + if (nb_erases == 0) + nb_erases = 1; + + /* check the "freeness" of Erase Unit before updating metadata + * FixMe: is this check really necessary ? since we have check the + * return code after the erase operation. + */ + if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0) + goto fail; + + uci.WearInfo = le32_to_cpu(nb_erases); + if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE + + 8, 8, &retlen, (char *)&uci) < 0) + goto fail; + return 0; fail: /* could not format, update the bad block table (caller is responsible for setting the ReplUnitTable to BLOCK_RESERVED on failure) */