Hi Dan, On Sat, Mar 19, 2011 at 12:39 PM, Dan Carpenter <error27@xxxxxxxxx> wrote: > The calculation is off-by-one. ÂIt should be "end - start + 1". ÂThis > patch fixes it to use resource_size() instead. ÂOddly, the code already > uses resource size correctly a couple lines earlier when it calls > request_mem_region() for this memory. > > Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> > > diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c > index 1d6f4b8..a316619 100644 > --- a/drivers/net/ftmac100.c > +++ b/drivers/net/ftmac100.c > @@ -1102,7 +1102,7 @@ static int ftmac100_probe(struct platform_device *pdev) > Â Â Â Â Â Â Â Âgoto err_req_mem; > Â Â Â Â} > > - Â Â Â priv->base = ioremap(res->start, res->end - res->start); > + Â Â Â priv->base = ioremap(res->start, resource_size(res)); > Â Â Â Âif (!priv->base) { > Â Â Â Â Â Â Â Âdev_err(&pdev->dev, "Failed to ioremap ethernet registers\n"); > Â Â Â Â Â Â Â Âerr = -EIO; Ah, I incautiously missed that line when code review. Thanks, Po-Yu Chuang -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html