From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de ([212.227.126.187]:54192 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935487Ab3DITJ5 (ORCPT ); Tue, 9 Apr 2013 15:09:57 -0400 From: Arnd Bergmann To: Thomas Petazzoni Subject: Re: [PATCHv7 08/17] pci: PCIe driver for Marvell Armada 370/XP systems Date: Tue, 9 Apr 2013 21:09:43 +0200 Cc: Bjorn Helgaas , Grant Likely , Russell King , "linux-pci@vger.kernel.org" , "linux-arm" , "devicetree-discuss@lists.ozlabs.org" , Lior Amsalem , Andrew Lunn , Jason Cooper , Maen Suleiman , Thierry Reding , Gregory Clement , Ezequiel Garcia , Olof Johansson , Tawfik Bayouk , Jason Gunthorpe , Mitch Bradley , Andrew Murray References: <1364395234-11195-1-git-send-email-thomas.petazzoni@free-electrons.com> <201304090014.06959.arnd@arndb.de> <20130409210652.3bc1958b@skate> In-Reply-To: <20130409210652.3bc1958b@skate> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Message-Id: <201304092109.43404.arnd@arndb.de> Sender: linux-pci-owner@vger.kernel.org List-ID: On Tuesday 09 April 2013, Thomas Petazzoni wrote: > Dear Arnd Bergmann, > > On Tue, 9 Apr 2013 00:14:06 +0200, Arnd Bergmann wrote: > > > pcie->realio.type = IORESOURCE_IO; > > pcie->realio.start = max(PCIBIOS_MIN_IO, range->pci_addr); > > pcie->realio.end = max(IO_SPACE_LIMIT, range->pci_addr + range->size); > > Shouldn't this last line be using "min()" so that we guarantee we don't > have an I/O region that goes beyond IO_SPACE_LIMIT? > Yes, of course. Sorry for not typing what I was thinking ;-) Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Tue, 9 Apr 2013 21:09:43 +0200 Subject: [PATCHv7 08/17] pci: PCIe driver for Marvell Armada 370/XP systems In-Reply-To: <20130409210652.3bc1958b@skate> References: <1364395234-11195-1-git-send-email-thomas.petazzoni@free-electrons.com> <201304090014.06959.arnd@arndb.de> <20130409210652.3bc1958b@skate> Message-ID: <201304092109.43404.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tuesday 09 April 2013, Thomas Petazzoni wrote: > Dear Arnd Bergmann, > > On Tue, 9 Apr 2013 00:14:06 +0200, Arnd Bergmann wrote: > > > pcie->realio.type = IORESOURCE_IO; > > pcie->realio.start = max(PCIBIOS_MIN_IO, range->pci_addr); > > pcie->realio.end = max(IO_SPACE_LIMIT, range->pci_addr + range->size); > > Shouldn't this last line be using "min()" so that we guarantee we don't > have an I/O region that goes beyond IO_SPACE_LIMIT? > Yes, of course. Sorry for not typing what I was thinking ;-) Arnd