mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 1/7] remoteproc: imx: Fix off-by-one error
Date: Mon, 05 Oct 2020 14:23:59 +0200	[thread overview]
Message-ID: <d4a9e876afaf38b2aaab6647ec8c26e2ebb12043.camel@pengutronix.de> (raw)
In-Reply-To: <20201005095346.27957-2-s.hauer@pengutronix.de>

Am Montag, den 05.10.2020, 11:53 +0200 schrieb Sascha Hauer:
> size is actually end - start + 1, fix size passed to
> request_sdram_region().
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  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);

That's a hand rolled version of resource_size(), I think it's better to
use this function instead.

Regards,
Lucas

>  		if (!res_cpu) {
>  			dev_err(dev, "remap optional addresses failed\n");
>  			return -ENOMEM;


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-10-05 12:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  9:53 [PATCH 0/7] remoteproc: Add i.MX8M Cortex-M[47] support Sascha Hauer
2020-10-05  9:53 ` [PATCH 1/7] remoteproc: imx: Fix off-by-one error Sascha Hauer
2020-10-05 12:23   ` Lucas Stach [this message]
2020-10-07  7:06     ` Sascha Hauer
2020-10-05  9:53 ` [PATCH 2/7] remoteproc: imx: Change SoC order in code Sascha Hauer
2020-10-05  9:53 ` [PATCH 3/7] remoteproc: imx: use function hooks in SoC data Sascha Hauer
2020-10-05  9:53 ` [PATCH 4/7] remoteproc: imx: Add i.MX8M support Sascha Hauer
2020-10-05  9:53 ` [PATCH 5/7] clk: i.MX8MQ: Add Cortex-M4 clk Sascha Hauer
2020-10-05  9:53 ` [PATCH 6/7] ARM: dts: i.MX8MQ: Add Cortex-M4 Coprocessor node Sascha Hauer
2020-10-05 12:05   ` Rouven Czerwinski
2020-10-07  7:07     ` Sascha Hauer
2020-10-05  9:53 ` [PATCH 7/7] ARM: dts: i.MX8MP: Add Cortex-M7 " Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4a9e876afaf38b2aaab6647ec8c26e2ebb12043.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox