From patchwork Thu Nov 23 13:32:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 119518 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp823106qgn; Thu, 23 Nov 2017 05:34:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMbuNkLJ0ypqMxuqXjmg8B1z7+O8TiBi6xF49FmwZHfouw3mhjjeGz6hNNd3WIKS/8GXbglN X-Received: by 10.101.100.65 with SMTP id s1mr24287160pgv.185.1511444041093; Thu, 23 Nov 2017 05:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511444041; cv=none; d=google.com; s=arc-20160816; b=c0tO4tiHwSeQL/JsdNmV6ajcHZghBjAdKVySt1HqoTCvH5nQgb3Oo3zC1nCOfT/IvP raOhvmQKhJ9TG6sXQsvdBEa+23GWmOZtEyTgxldqwqGJg6XhOwV6EUYNSRhfyEFdfIKC yFUNCMAUOnsxtKvFZg3DfpvoL1libzB8DDEU307tE+bcUNRQJEyBUx/dHw8wVhq8fOFn wBbjn/xUFXccLzVZXS6nQx6Bh3GQYc0DWmjX/qPnS1CHJSWIrYuYfP58jfMbpKioIEDU McVreyaHKqldWdqHDVWYQU8N0Jck5+Tt+RrtGaFSm9pbE3KLZjNg1y+z7PRHz+J6/36a LdYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter:dkim-signature:arc-authentication-results; bh=p+rQ5+KVkMRVb20UlITntI6d6RjYwH7gxnmfG5a+cEw=; b=YIXpfo8vOtyWHuF4UATIKCQfiaiwXir9KJNi5LZPpC259z+MoPPUlrzRNvj3mhG6ak zPPhkJJbsXoxUvD/sCDUzftyLkwhgyLGTWLnEw3OI92Ns9Y0a82yGN+/gRDVbBX02ro7 jfiRwaXxrbENhW3ydy/bpxtrlM8Ed72EJRVjdiNvr5SmPHrm+P9MZC/MVM4uCgiAlO+s lYAM7szqkJCsVSfZmeaFvfsZ7pzY1M9UoEtT5js2CqTL5OMCyLP+7I3d+HA6qI9tnjqs VLy6Xa32oegKUAMoUZwNuTxecbe/5DrLBRAdXGKpoJ7gKd+yeVy1MU55QrrA1WUZ/gvm IXXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=UDQI9cby; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=MHmponpb; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id a11si15649365pgv.592.2017.11.23.05.34.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 05:34:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=UDQI9cby; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=MHmponpb; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=p+rQ5+KVkMRVb20UlITntI6d6RjYwH7gxnmfG5a+cEw=; b=UDQ I9cbyV3myV4oOxu+FXX0ZXOwsvL7mOoEcRc9Cf9xtER0jk6vJe0l0J8IgcJuHKiK+qqTvWVFUOR9K W6Pptfy7paajDWadaqRu/6jSwYUFAzYocY3FZPuAFGwnkFO02eGJ4vk0FzZrDT+stOKulshNdXHzm 7rOVeOeWPAzLBRhkeK4+7UtaA0zWFd1SRWx4BXRaymtlgBXRSam5xjismAnCg2fbmbvxmgn0WF4Jo 2oqlR06qiciT5sJwT0Y4dqw5D6IHlv2psTBdFxniy51byTJhGaHbGwmxorMIY10y8CCOBSp67CKaH OJVXsSPrcDWLUBqSujP54luDELgcU0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eHrdW-0007VQ-NK; Thu, 23 Nov 2017 13:33:50 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eHrdS-0007UP-JV for linux-mtd@lists.infradead.org; Thu, 23 Nov 2017 13:33:48 +0000 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-12.nifty.com with ESMTP id vANDWvGB025704; Thu, 23 Nov 2017 22:32:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com vANDWvGB025704 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1511443978; bh=olyRKajJ8Wuw8IS4T3pdrybxhTKY7cnkDu/qQqjUfQE=; h=From:To:Cc:Subject:Date:From; b=MHmponpbFMiKJOSJx035tWKqGk4uOg/NbQVjTWZ2mIGrkAxGzOwLyqKjwuuJaT1jU 1JwNbYPG7G9MOSms3V40mpLy90APqAvVneKzdx8R4ib1orMfortRjUqyjkAJVwsvSY v3JEUxdnLdbSrK1bIyvESOqxqvMAUjXqR3afBU0aPbuJnx5ML+d/k2ZLsnq91osHrt 2NHSbZhhlFAdFzFWGjWgWBZP7d2OWHxCJRG61YyHIAe/BNl0Cxi2We/LadLFdtPss3 bpGn0nb6PDqqPLHDCgTzWx+QhATwCIES2Mqm83fqxeTHE7pokRpMteLt86d8acGR0l 6sq+mlW/f7o/g== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Subject: [PATCH] mtd: nand: denali: rename misleading dma_buf to tmp_buf Date: Thu, 23 Nov 2017 22:32:28 +0900 Message-Id: <1511443948-18474-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171123_053346_875417_F3E944E2 X-CRM114-Status: GOOD ( 12.49 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Cyrille Pitchen , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org The "dma_buf" is not used for a DMA bounce buffer, but for arranging the transferred data for the syndrome page layout. In fact, it is used in the PIO mode as well, so "dma_buf" is a misleading name. Rename it to "tmp_buf". Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 5124f8a..34008a0 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -710,12 +710,12 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, int ecc_steps = chip->ecc.steps; int ecc_size = chip->ecc.size; int ecc_bytes = chip->ecc.bytes; - void *dma_buf = denali->buf; + void *tmp_buf = denali->buf; int oob_skip = denali->oob_skip_bytes; size_t size = writesize + oobsize; int ret, i, pos, len; - ret = denali_data_xfer(denali, dma_buf, size, page, 1, 0); + ret = denali_data_xfer(denali, tmp_buf, size, page, 1, 0); if (ret) return ret; @@ -730,11 +730,11 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, else if (pos + len > writesize) len = writesize - pos; - memcpy(buf, dma_buf + pos, len); + memcpy(buf, tmp_buf + pos, len); buf += len; if (len < ecc_size) { len = ecc_size - len; - memcpy(buf, dma_buf + writesize + oob_skip, + memcpy(buf, tmp_buf + writesize + oob_skip, len); buf += len; } @@ -745,7 +745,7 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, uint8_t *oob = chip->oob_poi; /* BBM at the beginning of the OOB area */ - memcpy(oob, dma_buf + writesize, oob_skip); + memcpy(oob, tmp_buf + writesize, oob_skip); oob += oob_skip; /* OOB ECC */ @@ -758,11 +758,11 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, else if (pos + len > writesize) len = writesize - pos; - memcpy(oob, dma_buf + pos, len); + memcpy(oob, tmp_buf + pos, len); oob += len; if (len < ecc_bytes) { len = ecc_bytes - len; - memcpy(oob, dma_buf + writesize + oob_skip, + memcpy(oob, tmp_buf + writesize + oob_skip, len); oob += len; } @@ -770,7 +770,7 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, /* OOB free */ len = oobsize - (oob - chip->oob_poi); - memcpy(oob, dma_buf + size - len, len); + memcpy(oob, tmp_buf + size - len, len); } return 0; @@ -841,7 +841,7 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, int ecc_steps = chip->ecc.steps; int ecc_size = chip->ecc.size; int ecc_bytes = chip->ecc.bytes; - void *dma_buf = denali->buf; + void *tmp_buf = denali->buf; int oob_skip = denali->oob_skip_bytes; size_t size = writesize + oobsize; int i, pos, len; @@ -851,7 +851,7 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, * This simplifies the logic. */ if (!buf || !oob_required) - memset(dma_buf, 0xff, size); + memset(tmp_buf, 0xff, size); /* Arrange the buffer for syndrome payload/ecc layout */ if (buf) { @@ -864,11 +864,11 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, else if (pos + len > writesize) len = writesize - pos; - memcpy(dma_buf + pos, buf, len); + memcpy(tmp_buf + pos, buf, len); buf += len; if (len < ecc_size) { len = ecc_size - len; - memcpy(dma_buf + writesize + oob_skip, buf, + memcpy(tmp_buf + writesize + oob_skip, buf, len); buf += len; } @@ -879,7 +879,7 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *oob = chip->oob_poi; /* BBM at the beginning of the OOB area */ - memcpy(dma_buf + writesize, oob, oob_skip); + memcpy(tmp_buf + writesize, oob, oob_skip); oob += oob_skip; /* OOB ECC */ @@ -892,11 +892,11 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, else if (pos + len > writesize) len = writesize - pos; - memcpy(dma_buf + pos, oob, len); + memcpy(tmp_buf + pos, oob, len); oob += len; if (len < ecc_bytes) { len = ecc_bytes - len; - memcpy(dma_buf + writesize + oob_skip, oob, + memcpy(tmp_buf + writesize + oob_skip, oob, len); oob += len; } @@ -904,10 +904,10 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, /* OOB free */ len = oobsize - (oob - chip->oob_poi); - memcpy(dma_buf + size - len, oob, len); + memcpy(tmp_buf + size - len, oob, len); } - return denali_data_xfer(denali, dma_buf, size, page, 1, 1); + return denali_data_xfer(denali, tmp_buf, size, page, 1, 1); } static int denali_write_page(struct mtd_info *mtd, struct nand_chip *chip,