Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1777179imu; Sun, 18 Nov 2018 08:38:03 -0800 (PST) X-Google-Smtp-Source: AJdET5eQYSj1U5rn2YMeleMMGm4HpvsKmTy0q1rm43jvaRtk+ikYCG76g4Oo24FO7A4Mu7DmL+sl X-Received: by 2002:a63:5a57:: with SMTP id k23mr16932078pgm.5.1542559082998; Sun, 18 Nov 2018 08:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542559082; cv=none; d=google.com; s=arc-20160816; b=n1AUHtZQwVaTtlzO/ky57OhKtdw2OpRp/uyS4qd+cH+y+nY3/ipk8TjCB9LVxxQLRZ eGelsa4Arp8yvnxrZUcNPLzhseP4JlmL7v7X8nHyKOk/dLd+Q+p7vFp+VEeJ0jO5fefV vuCn+bwIRoMssOacPnNeuHwE4nzpcojLOwCXIvDoS8i1xKAeUqc/booEpekzPqaOx7wc yK8FHFtEJ0IUFJt51NxJ/1eJx79ySQNlDqYqLTu65Gpru4yBngvVOmf7+GkLACIEQRet T7Ey97XO7UNYjsIAQ/NLNJZ0wkNqH3UIjPOnSnmeO6tSejUAfTC5AmZ4Z69YFaoQEXRB fLkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RYctNiRbW81QTmHoSBKUzH/gc6AiOOEByERi6PkcA/M=; b=DuyNPx+LOOVBeym+WpYCsamk9tHSGjy90RLUnS3PXcmGTCiCylJRZUMfASfL1JnzOr ggdCH7jVdjkI+tNNDOnolIEBAiasHaadDQeMBKN09v/jrgFGPiaGvv4tN9dlLZZavOm3 s8R14ywy+jkounIgrA904eGzo53pkU3OR6+CKjO0JVL9VzwbPY+pP0XLErNC4p6cRYoV cQcw3IEEDVfYL49tEQxCoon6xVr2XFQQ5WL+sf6SSG5Qn2R2eTHxfL3AzP7DVffL6JHs YaZe+gbUFPfjh4E6mhCw3DZ1C0vrZQstcz1eKbhiLB7x0TJR3oxMRNQ5GxcuBqK/Jv1h majw== ARC-Authentication-Results: i=1; mx.google.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39-v6si37527161plg.366.2018.11.18.08.37.47; Sun, 18 Nov 2018 08:38:02 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727459AbeKSC5z (ORCPT + 99 others); Sun, 18 Nov 2018 21:57:55 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:41457 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726804AbeKSC5z (ORCPT ); Sun, 18 Nov 2018 21:57:55 -0500 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 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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) */ -- 2.19.1