From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 18 Apr 2013 16:38:03 +0100 From: Andrew Murray To: Grant Likely Subject: Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property Message-ID: <20130418153803.GA19373@arm.com> References: <1366107508-12672-1-git-send-email-Andrew.Murray@arm.com> <1366107508-12672-3-git-send-email-Andrew.Murray@arm.com> <20130418134401.84AEE3E1319@localhost> <20130418142434.GA18881@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: Cc: "linux-mips@linux-mips.org" , "siva.kallam@samsung.com" , "linux-pci@vger.kernel.org" , "linus.walleij@linaro.org" , "thierry.reding@avionic-design.de" , Liviu Dudau , "paulus@samba.org" , "linux-samsung-soc@vger.kernel.org" , "linux@arm.linux.org.uk" , "jg1.han@samsung.com" , "jgunthorpe@obsidianresearch.com" , "thomas.abraham@linaro.org" , "arnd@arndb.de" , "devicetree-discuss@lists.ozlabs.org" , "rob.herring@calxeda.com" , "kgene.kim@samsung.com" , "bhelgaas@google.com" , "linux-arm-kernel@lists.infradead.org" , "thomas.petazzoni@free-electrons.com" , "monstr@monstr.eu" , "linux-kernel@vger.kernel.org" , "suren.reddy@samsung.com" , "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Apr 18, 2013 at 04:29:54PM +0100, Grant Likely wrote: > On Thu, Apr 18, 2013 at 3:24 PM, Andrew Murray wrote: > > On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: > >> On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray wrote: > >> > /* Act based on address space type */ > >> > res = NULL; > >> > - switch ((pci_space >> 24) & 0x3) { > >> > - case 1: /* PCI IO space */ > >> > + res_type = range.flags & IORESOURCE_TYPE_BITS; > >> > + if (res_type == IORESOURCE_IO) { > >> > >> Why the change from switch() to an if/else if sequence? > > > > Russell King suggested this change - see > > https://patchwork.kernel.org/patch/2323941/ > > Umm, that isn't what that link shows. That link shows the patch > already changing to an if/else if construct, and rmk is commenting on > that. Arh yes sorry about that. I can't find or remember any good reason why I changed it from a switch to an if/else :\ Andrew Murray