lkml.org 
[lkml]   [2018]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/8] mtd: maps: gpio-addr-flash: Fix ioremapped size
    On Tue, 21 Aug 2018 16:31:46 +0200
    Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:

    > We should only iomap the area of the chip that is memory mapped.
    > Otherwise we could be mapping devices beyond the memory space or that
    > belong to other devices.
    >

    Can you add

    Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable")

    and in case you want to backport the fix:

    Cc: <stable@vger.kernel.org>

    > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
    > ---
    > drivers/mtd/maps/gpio-addr-flash.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
    > index 17be47f72973..6de16e81994c 100644
    > --- a/drivers/mtd/maps/gpio-addr-flash.c
    > +++ b/drivers/mtd/maps/gpio-addr-flash.c
    > @@ -234,7 +234,7 @@ static int gpio_flash_probe(struct platform_device *pdev)
    > state->map.copy_to = gf_copy_to;
    > state->map.bankwidth = pdata->width;
    > state->map.size = state->win_size * (1 << state->gpio_count);
    > - state->map.virt = ioremap_nocache(memory->start, state->map.size);
    > + state->map.virt = ioremap_nocache(memory->start, state->win_size);
    > if (!state->map.virt)
    > return -ENOMEM;
    >

    \
     
     \ /
      Last update: 2018-08-28 16:26    [W:2.503 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site