Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7186333imm; Tue, 28 Aug 2018 07:46:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdatWT9W4CGauBca7/SvkSurHKwmO9B06gAsuYeF6tugYurrgN+6vMJmG+d4zwKJ5qndjPkm X-Received: by 2002:a65:464b:: with SMTP id k11-v6mr1875190pgr.448.1535467607167; Tue, 28 Aug 2018 07:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535467607; cv=none; d=google.com; s=arc-20160816; b=W8L2uTPdVVsmwNoXKDCW9/W81tauGu5YqHkK6JuIZddiU/+srjNdcu6aTlqREr7oc9 oCfjU8592rDXiDG2oivRL8DMxXjpMxcDqQmZBUkPAsWGOA3vdHphdwm4FqeeOBWjWEb4 q9lnhoROK/kS+ZNhcbHy5Os+9hdboGcSkLDSX87jjMxyiVMWdIb8sSkegCg44FvTH7Aq l65x1f5TPfebR7tFi7YCNYHry2c3BbvQ9CXAxtcNgAStJET6WuULIK/u39GFkjZMjg1Y WGRGrvtYtCUEYMgqYf7js9U0ySy69FZG/CgDpF3nveWHu9lcshjL5KuxgwJUw3uEz6jJ rLnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=7aD7y8HEmqSRSbl6Rqo91KmIvIJgDy/amWk/KbSw9hE=; b=lLX5UJq4F0BprvCWX55rIEORRQueua6KPnwq7+BJ+ndayJ3yi8nvCPtmMk0zmaapIE QUXmKbXpX6o69vnvTJOaW3SPWyTwhK4QeDtyESjyiWWSYTieflkUdxLTTIrVuKYmZhn1 DqW54PHNMVviS7llsD2q7H5guVytBS9xIv559BaKowuhWunfXCC7NP7T0ZlX4XdCGDqM 3wDJidC6AEeJiUZygSe0/0t6IZTOwIwS+cwPrTug4aJ5LIWecCafnbCRALVbL2e0fu60 1tZBuQ9r4W8qbSiJwzXuOMoTIAFWyEccOZXOk46+paTbml0b5pOEYs6eUJmhwq/2Fb6/ Gfow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LqFOvshg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si1037223pff.248.2018.08.28.07.46.32; Tue, 28 Aug 2018 07:46:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LqFOvshg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728357AbeH1ShQ (ORCPT + 99 others); Tue, 28 Aug 2018 14:37:16 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45755 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727284AbeH1ShQ (ORCPT ); Tue, 28 Aug 2018 14:37:16 -0400 Received: by mail-lj1-f194.google.com with SMTP id u83-v6so1630796lje.12 for ; Tue, 28 Aug 2018 07:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7aD7y8HEmqSRSbl6Rqo91KmIvIJgDy/amWk/KbSw9hE=; b=LqFOvshgkDgGPiD3VwWZ9zVJsrhL2tMegX4Sd6jzCYCTop3odCwV9mMgR6qEL03iPx k0SiZiRqDqzj1rov8hcV+Q/q51zshVpq4zN/fjFml30e4eMigQL4nv3HeTdh1/Q1L2UN k2nDdG3Pn1pUD+1aYO+mV6gySsK5vZs2fMC9R2u6CZ8GloXKYXrjri9FsFDTNvh54mlK aljIWxtCpWxSeNMeaZrZnNKuW2qlHy4HnCad78fnUZLOybziwRcDl4w0+NAjy1fsrSzF VSack95UCx+FXayFt7w738+v7RrUGevwcmqZCC3/Geg/0vAs4AQ9OGgFpedIUDfB8aPV lrfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7aD7y8HEmqSRSbl6Rqo91KmIvIJgDy/amWk/KbSw9hE=; b=N54Z7NSU9icGSQEcGlIvFZbGnrnFKstjmVYDlxRC0Z85jm9nRXOwLfle8h1iZ4FzhY Ih7eKxxcQN3MaAfqvdeMichExtRqkfNSCUDPTca3D0c2QsZcpM7IDAf6kKHx+5M3zLIs iy6LmFzAjcSn4Ms4dXkYHF2NV7XhuTiTodhVjmX2q20VKSPaFViTAWoGsgfU/QxKtLyI rLYN+eG5GzoTJGUS523OxXvGviLAhX4sF6CT1SuW3+p3gA5YXOdakj3yT17LCZEULfBs o2H9jKd7/uJy9iSvE7BX5AvwPfpaT0nzAClx9dEe41QCIv1Z0J96nK0zOuVoEBilAcQQ anKQ== X-Gm-Message-State: APzg51A82JuC7gQLzXQG2Aa29YXKw3kEi2i3f+U5pVh2FUlRxGl5QDc2 Qp2IcIQXd3vN/4OgiteNLihbo2x459RMaSENLnk= X-Received: by 2002:a2e:4782:: with SMTP id u124-v6mr1611758lja.40.1535467514290; Tue, 28 Aug 2018 07:45:14 -0700 (PDT) MIME-Version: 1.0 References: <20180821143152.32293-1-ricardo.ribalda@gmail.com> <20180821143152.32293-3-ricardo.ribalda@gmail.com> <20180828162611.2f45e5c9@bbrezillon> In-Reply-To: <20180828162611.2f45e5c9@bbrezillon> From: Ricardo Ribalda Delgado Date: Tue, 28 Aug 2018 16:44:57 +0200 Message-ID: Subject: Re: [PATCH 2/8] mtd: maps: gpio-addr-flash: Fix ioremapped size To: Boris Brezillon Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Zhouyang Jia , linux-mtd@lists.infradead.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris On Tue, Aug 28, 2018 at 4:26 PM Boris Brezillon wrote: > > On Tue, 21 Aug 2018 16:31:46 +0200 > Ricardo Ribalda Delgado 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") Sure, I have some other changes for the patchset at https://github.com/ribalda/linux/tree/gpio-addr-flash-v2 I will wait a couple of days for more reviews and I will resend the patches > > and in case you want to backport the fix: > > Cc: > > > Signed-off-by: Ricardo Ribalda Delgado > > --- > > 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; > > > -- Ricardo Ribalda