Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17640563ybl; Thu, 2 Jan 2020 09:11:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwgm8iyQtUOlC+giPHEDfh+SKx+8gZtCA7UDK8VZvkAWLUTWKCYU2BDoNtE/CaprruPE2Yj X-Received: by 2002:a9d:4d8d:: with SMTP id u13mr90309348otk.299.1577985107793; Thu, 02 Jan 2020 09:11:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577985107; cv=none; d=google.com; s=arc-20160816; b=LNLAgG/XggtqGQpzwnlHxyrWlgrNnl6RZDc8eVASOUIxP2Uh5xB8fcpBQhVYsUXsn/ Em4/n7mn3Z6HLZERr3re+t9lmpiGUqJ4IW4x2adOQBUce5mST7MaNon6ZpckMzBhnRbA pxBlOWB6CWEDMfcUP5E3fwFYmvbjH0Z+81SNvWnFKwJiAOnU67hpFs5Q1IG7rfzd3L6u eyBGlozZ4sbF7v0pIWDoj70gORw3K58AGN5r3PXHinxfvPvKS0agbsfLcUAl1HvEsUgL 0BjhjNSNyzt/VfLg4U073iJ5BLLNPmwwqw9aV/z0cDoZYpA6kYBj4zSDp7Nxhk5FqEs5 9UmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=ICz0O08t3a/RBlQWCudjBOmlSFab7Caoxuic86MaXF4=; b=oGsufalASUgcrvFHxZRMIv/xjsWWImIWiYhVn//OjFkLi696S9Yc6MQ0rEGYI7QmqQ OpEW2EZGlWnFRwgPojsSHAUm3xep+IZrvFGHU56VaZ7eiqVG1idqCCutffTVSltshcn0 mpvqol8MjiRsx7kGXQQ/unDtWfH22Hq9M5pWG7UKeMT3u+LeaktCoijpDVgDJXIwYIAJ h9ORpf5fGp5O82HXpzAo9fisukoTyn/EoLGM2B1dvyltlRj2PyhJcl1gPrrUal4ts5qO GhP4pSmrLMg9JfLJ3EPjvLDhNY5vdd5IPGWnHURlcIBfPsG8Q3gt3hM6zVdyremCPe+4 Cgig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RhOh/oE8"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si21746957oth.306.2020.01.02.09.11.35; Thu, 02 Jan 2020 09:11:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RhOh/oE8"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727743AbgABRKR (ORCPT + 99 others); Thu, 2 Jan 2020 12:10:17 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:37383 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbgABRKR (ORCPT ); Thu, 2 Jan 2020 12:10:17 -0500 Received: by mail-yw1-f66.google.com with SMTP id z7so17456917ywd.4 for ; Thu, 02 Jan 2020 09:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=ICz0O08t3a/RBlQWCudjBOmlSFab7Caoxuic86MaXF4=; b=RhOh/oE8j3iq3lY4LyVvlnQs7jG3jFueKDDZlLUK33eQu/R0nr639qp3UgEvKk6iSx j9Pls8wvdcyXJebToFEogu2fq8G2mG4EKEXfts8GX0PNk6X4sj3Mgm1Lpiw21GyuwxHA kbDoFF1ZLgLHQpUz2DNSK51PZY0w4DfJh8K9MG2aOeUGEoOKRP3jiHKsAEbLn+2zgLwm reyFZc34fBBBkx7VMM8K2rGaH+NpxUG05HYaQ+EtIjDRBwWDpr81ZDS0V4kTDPiBm/Fk +K8wLHRuc8D8oCrEX9S+wViTP7cOofwPZz//Hgi3QO4B1CWA3XcLEXiRtqoz0fgFQARV McOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=ICz0O08t3a/RBlQWCudjBOmlSFab7Caoxuic86MaXF4=; b=W9KzQrAlM2ah+t2IKGvjCjWunKvYQrgo8bjl0BTwoaOW8mgjGotyPhzg1QcuxAFfZI nZlpkQYRKZ9iclbdi7jeBx5+HplZ1VlKAwYFhihQmG5y92H+SpccgtpxZ3UO+AMkUv02 Xvpz9/nck+bs0Xi98xXLFc5HdS9lxBadeEunGOA9aX5Gz2e3wE6RXLcChBY1XMwMeKtc gBZU721lmmDn9pHkDfTzTREgpHc1W/VPkfuLc4bm7ey01O6W4alljX1fdFbcWYeBsP9/ kjswmcbz1Y3r3pql2T4BmS3+z0I8k9qyUSJBIplNr2jINVipkhOLHalQElAHWEEzN127 vL/w== X-Gm-Message-State: APjAAAU3Rs44QrEifoYPKlHUei7t1xrXznxpd85L+JUP9sSiamQquH5Z IqkUjnIwRcwTbj4phLghyFg= X-Received: by 2002:a81:72c3:: with SMTP id n186mr62008253ywc.342.1577985015967; Thu, 02 Jan 2020 09:10:15 -0800 (PST) Received: from user-ThinkPad-X230 ([2601:cd:4005:d680:940e:5f6e:348a:1ff0]) by smtp.gmail.com with ESMTPSA id d137sm20471827ywd.86.2020.01.02.09.10.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2020 09:10:15 -0800 (PST) Date: Thu, 2 Jan 2020 12:10:08 -0500 From: Amir Mahdi Ghorbanian To: kyungmin.park@samsung.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: nand: checkpatch.pl cleanup - fix errors and checks Message-ID: <20200102171008.GA15268@user-ThinkPad-X230> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Correct mispelling, spacing, and coding style flaws caught by checkpatch.pl script. Signed-off-by: Amir Mahdi Ghorbanian --- drivers/mtd/nand/onenand/omap2.c | 11 ++++++----- drivers/mtd/nand/onenand/onenand_base.c | 14 +++++++------- include/linux/mtd/flashchip.h | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/mtd/nand/onenand/omap2.c b/drivers/mtd/nand/onenand/omap2.c index edf94ee54ec7..8cb2294bc837 100644 --- a/drivers/mtd/nand/onenand/omap2.c +++ b/drivers/mtd/nand/onenand/omap2.c @@ -148,13 +148,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) unsigned long timeout; u32 syscfg; - if (state == FL_RESETING || state == FL_PREPARING_ERASE || + if (state == FL_RESETTING || state == FL_PREPARING_ERASE || state == FL_VERIFYING_ERASE) { int i = 21; unsigned int intr_flags = ONENAND_INT_MASTER; switch (state) { - case FL_RESETING: + case FL_RESETTING: intr_flags |= ONENAND_INT_RESET; break; case FL_PREPARING_ERASE: @@ -375,7 +375,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area, * context fallback to PIO mode. */ if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 || - count < 384 || in_interrupt() || oops_in_progress ) + count < 384 || in_interrupt() || oops_in_progress) goto out_copy; xtra = count & 3; @@ -422,7 +422,7 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area, * context fallback to PIO mode. */ if (!virt_addr_valid(buf) || bram_offset & 3 || (size_t)buf & 3 || - count < 384 || in_interrupt() || oops_in_progress ) + count < 384 || in_interrupt() || oops_in_progress) goto out_copy; dma_src = dma_map_single(dev, buf, count, DMA_TO_DEVICE); @@ -528,7 +528,8 @@ static int omap2_onenand_probe(struct platform_device *pdev) c->gpmc_cs, c->phys_base, c->onenand.base, c->dma_chan ? "DMA" : "PIO"); - if ((r = onenand_scan(&c->mtd, 1)) < 0) + r = onenand_scan(&c->mtd, 1); + if (r < 0) goto err_release_dma; freq = omap2_onenand_get_freq(c->onenand.version_id); diff --git a/drivers/mtd/nand/onenand/onenand_base.c b/drivers/mtd/nand/onenand/onenand_base.c index 77bd32a683e1..85640ee11c86 100644 --- a/drivers/mtd/nand/onenand/onenand_base.c +++ b/drivers/mtd/nand/onenand/onenand_base.c @@ -2853,7 +2853,7 @@ static int onenand_otp_write_oob_nolock(struct mtd_info *mtd, loff_t to, /* Exit OTP access mode */ this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); status = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); status &= 0x60; @@ -2924,7 +2924,7 @@ static int do_otp_read(struct mtd_info *mtd, loff_t from, size_t len, /* Exit OTP access mode */ this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); return ret; } @@ -2968,7 +2968,7 @@ static int do_otp_write(struct mtd_info *mtd, loff_t to, size_t len, /* Exit OTP access mode */ this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); return ret; } @@ -3008,7 +3008,7 @@ static int do_otp_lock(struct mtd_info *mtd, loff_t from, size_t len, /* Exit OTP access mode */ this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); } else { ops.mode = MTD_OPS_PLACE_OOB; ops.ooblen = len; @@ -3413,7 +3413,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) this->boundary[die] = bdry & FLEXONENAND_PI_MASK; this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); printk(KERN_INFO "Die %d boundary: %d%s\n", die, this->boundary[die], locked ? "(Locked)" : "(Unlocked)"); @@ -3635,7 +3635,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die, ret = this->wait(mtd, FL_WRITING); out: this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_REG_COMMAND); - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); if (!ret) /* Recalculate device size on boundary change*/ flexonenand_get_size(mtd); @@ -3671,7 +3671,7 @@ static int onenand_chip_probe(struct mtd_info *mtd) /* Reset OneNAND to read default register values */ this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_BOOTRAM); /* Wait reset */ - this->wait(mtd, FL_RESETING); + this->wait(mtd, FL_RESETTING); /* Restore system configuration 1 */ this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); diff --git a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h index ecc88a41792a..c04f690871ca 100644 --- a/include/linux/mtd/flashchip.h +++ b/include/linux/mtd/flashchip.h @@ -40,7 +40,7 @@ typedef enum { FL_READING, FL_CACHEDPRG, /* These 4 come from onenand_state_t, which has been unified here */ - FL_RESETING, + FL_RESETTING, FL_OTPING, FL_PREPARING_ERASE, FL_VERIFYING_ERASE, -- 2.17.1