Re: [PATCH 1/7] remoteproc: imx: Fix off-by-one error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 05, 2020 at 02:23:59PM +0200, Lucas Stach wrote:
> 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@xxxxxxxxxxxxxx>
> > ---
> >  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.

Right, fixed.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux