From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756925AbbFPJzI (ORCPT ); Tue, 16 Jun 2015 05:55:08 -0400 Received: from foss.arm.com ([217.140.101.70]:36461 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756235AbbFPJy6 (ORCPT ); Tue, 16 Jun 2015 05:54:58 -0400 Date: Tue, 16 Jun 2015 10:55:07 +0100 From: Lorenzo Pieralisi To: Suravee Suthikulanit Cc: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Ralf Baechle , "James E.J. Bottomley" , Michael Ellerman , Bjorn Helgaas , Richard Henderson , Benjamin Herrenschmidt , David Howells , Russell King , Tony Luck , "David S. Miller" , Ingo Molnar , Guenter Roeck , Michal Simek , Chris Zankel , Arnd Bergmann , Krzysztof Halasa , Phil Edworthy , Jason Gunthorpe , Jingoo Han , Lucas Stach , Simon Horman , Minghuan Lian , Murali Karicheri , Tanmay Inamdar , Kishon Vijay Abraham I , Thierry Reding , Thomas Petazzoni , Will Deacon , Jayachandran C Subject: Re: [RFC/RFT PATCH v2] PCI: move pci_read_bridge_bases to the generic PCI layer Message-ID: <20150616095507.GB24710@red-moon> References: <1433840506-20083-1-git-send-email-lorenzo.pieralisi@arm.com> <5579E74A.3000808@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5579E74A.3000808@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2015 at 08:53:46PM +0100, Suravee Suthikulanit wrote: > For ARM64 PROBE_ONLY and non-PROBE_ONLY modes: > > Reviewed and Tested-by: Suravee Suthikulpanit > Thank you ! > Please see minor comments below. [...] > > +static void pci_claim_bridge_resources(struct pci_bus *bus) > > +{ > > + struct pci_dev *dev = bus->self; > > + int idx; > > + > > + for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) { > > + struct resource *r = &dev->resource[idx]; > > + > > + if (!r->flags || r->parent) > > + continue; > > + > > + pci_claim_bridge_resource(dev, idx); > > + } > > +} > > + > > Nitpicking: Since pci_claim_bridge_resources() is small, and only called > once from pci_read_brdige_bases(), should we just put the loop inside > the function? I think it is ok to add a function for it, I am not fussed either way I am more concerned by testing the patch on archs I do not have access to. Thank you, Lorenzo