Message ID | 1462494716-95312-11-git-send-email-computersforpeace@gmail.com |
---|---|
State | Accepted |
Commit | 95193796256cfce16e5d881318e15b6b04062c15 |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r1CTg226mz9t73 for <incoming@patchwork.ozlabs.org>; Fri, 6 May 2016 10:34:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=nTNdUukN; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayThz-00073o-OP; Fri, 06 May 2016 00:33:31 +0000 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayThZ-0006VJ-7X for linux-mtd@lists.infradead.org; Fri, 06 May 2016 00:33:05 +0000 Received: by mail-pf0-x232.google.com with SMTP id 206so43417669pfu.0 for <linux-mtd@lists.infradead.org>; Thu, 05 May 2016 17:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AGlTeDIFh7UwUuuTQg+0Cy5v/FWbpkRG1GvtQ/Rq/xU=; b=nTNdUukNDc6r8TZKHWKuApid54vprTwlqO0qH8RmwfyzsqxwhoGi65I3RBYwkak7e3 5S2jy5K4ZZQD0NmX2SL6cFEkmQbLBb4TMJO4xcYr8BYz2JE3BPOY6T2u9rpM4gLt7c1m kGAG40EuYqauV8e3obQpeBWOFcA+ooXPHAC2oDpU7O0oWXtBBDGPv+DwY+2weVeKbvIy QAzgWSQ5rsRorldCLdjfx6mB5aAqMDURCM2JKFhgQO/NDb+/dtfccasEghmFIf+gCnAO noeMgkfL61Sj9X44zFZ/KcVj/KfcqOT92HJKv5g0ppJvtBuhPtpIaLt029TpezzDRpn3 AoCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AGlTeDIFh7UwUuuTQg+0Cy5v/FWbpkRG1GvtQ/Rq/xU=; b=HTrOfwGXfSW7XU/D9VE8YXoX4Xmtq/sSdEwEe1Hrv17hyLyjZnokcDgYZvDY/IdYmg 6sxsC1SGT1OffJ8IplIVkvIayt07UgMqxTH1ToUo2icUY8RL5YHRDBfsT+kNN5sG7+eu 6Np3tEn49RkQxxIUCtPq5gEXseykukzqhGmbUbvpRIyhUQQA/qkZlgtRUd1o/mEzqToz yXQaD8BmbgKKMcXB+hFWWPiOdTHv6C2gLeN3Enw+e5v4yBBO7ha39zTDK+86NcBUD4YB 1qwnSOLrmUVkAbI8dylsyEaLLnuvVaUVDzvLXV50F4aPE4YVVQDNxHF1JqEGgIDqGRm9 cAXg== X-Gm-Message-State: AOPr4FUqznPVUZadUsrZ9VIJMzmKDm3smIRROf4qwMgvSArSrkWzxjyCOihOCl00xdh+Pg== X-Received: by 10.98.31.65 with SMTP id f62mr24852974pff.83.1462494764546; Thu, 05 May 2016 17:32:44 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id n10sm16337821pax.18.2016.05.05.17.32.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 May 2016 17:32:44 -0700 (PDT) From: Brian Norris <computersforpeace@gmail.com> To: <linux-mtd@lists.infradead.org> Subject: [PATCH v7 10/10] mtd: m25p80: read in spi_max_transfer_size chunks Date: Thu, 5 May 2016 17:31:56 -0700 Message-Id: <1462494716-95312-11-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1462494716-95312-1-git-send-email-computersforpeace@gmail.com> References: <1462494716-95312-1-git-send-email-computersforpeace@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160505_173305_432170_A9181168 X-CRM114-Status: GOOD ( 10.06 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:232 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (computersforpeace[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>, Michal Suchanek <hramrach@gmail.com>, Gabor Juhos <juhosg@openwrt.org>, Bean Huo <beanhuo@micron.com>, Rafal Milecki <zajec5@gmail.com>, linux-kernel@vger.kernel.org, Bayi Cheng <bayi.cheng@mediatek.com>, "Andrew F. Davis" <afd@ti.com>, Javier Martinez Canillas <javier@osg.samsung.com>, Jagan Teki <jteki@openedev.com>, Han Xu <han.xu@nxp.com>, Cyrille Pitchen <cyrille.pitchen@atmel.com>, Brian Norris <computersforpeace@gmail.com>, Mika Westerberg <mika.westerberg@linux.intel.com>, Joachim Eastwood <manabian@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index eab46d211ae6..9cf7fcd28034 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -172,7 +172,7 @@ static ssize_t m25p80_read(struct spi_nor *nor, loff_t from, size_t len, t[1].rx_buf = buf; t[1].rx_nbits = m25p80_rx_nbits(nor); - t[1].len = len; + t[1].len = min(len, spi_max_transfer_size(spi)); spi_message_add_tail(&t[1], &m); ret = spi_sync(spi, &m);