From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPNBs-0005hQ-Bh for barebox@lists.infradead.org; Mon, 05 Oct 2020 09:53:57 +0000 From: Sascha Hauer Date: Mon, 5 Oct 2020 11:53:40 +0200 Message-Id: <20201005095346.27957-2-s.hauer@pengutronix.de> In-Reply-To: <20201005095346.27957-1-s.hauer@pengutronix.de> References: <20201005095346.27957-1-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/7] remoteproc: imx: Fix off-by-one error To: Barebox List size is actually end - start + 1, fix size passed to request_sdram_region(). Signed-off-by: Sascha Hauer --- drivers/remoteproc/imx_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 370bebe6e2..74a8d8ff2e 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -305,7 +305,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, break; res_cpu = request_sdram_region(dev_name(dev), res.start, - res.end - res.start); + res.end - res.start + 1); if (!res_cpu) { dev_err(dev, "remap optional addresses failed\n"); return -ENOMEM; -- 2.28.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox