Message ID | ed5a2015ecd360746ab52e8d3f5e8b6f5e1568fa.1523493475.git.fthain@telegraphics.com.au (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Finn, On Thu, Apr 12, 2018 at 2:50 AM, Finn Thain <fthain@telegraphics.com.au> wrote: > The resource size is 0x2000 == end - start + 1. > Therefore end == start + 0x2000 - 1. > > Cc: Laurent Vivier <lvivier@redhat.com> > Cc: stable@vger.kernel.org # v4.14+ > Tested-by: Stan Johnson <userm57@yahoo.com> > Signed-off-by: Finn Thain <fthain@telegraphics.com.au> > Acked-by: Laurent Vivier <lvivier@redhat.com> > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Thanks, applied and queued for v4.18. > --- a/arch/m68k/mac/config.c > +++ b/arch/m68k/mac/config.c > @@ -1011,7 +1011,7 @@ int __init mac_platform_init(void) > struct resource swim_rsrc = { > .flags = IORESOURCE_MEM, > .start = (resource_size_t)swim_base, > - .end = (resource_size_t)swim_base + 0x2000, > + .end = (resource_size_t)swim_base + 0x1FFF, BTW, probably you want to change swim_base from u8 * to phys_addr_t, one day. Gr{oetje,eeting}s, Geert
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 84bd9161bf23..4a544a6c72dd 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -1011,7 +1011,7 @@ int __init mac_platform_init(void) struct resource swim_rsrc = { .flags = IORESOURCE_MEM, .start = (resource_size_t)swim_base, - .end = (resource_size_t)swim_base + 0x2000, + .end = (resource_size_t)swim_base + 0x1FFF, }; platform_device_register_simple("swim", -1, &swim_rsrc, 1);