From patchwork Tue May 15 05:58:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 10399963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AEA65600F4 for ; Tue, 15 May 2018 06:02:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C7A828646 for ; Tue, 15 May 2018 06:02:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 701BB28647; Tue, 15 May 2018 06:02:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0293D285FF for ; Tue, 15 May 2018 06:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=b73L32ygTkjrqJLoO6q6uvC+UYgji7BYIlvV6r6X70I=; b=T5D4EiKDiScoruc11xH3PvmX7T 6JSz4v+PN6frN8gT5125gqXl/YQoT6hdvzIOwc/1sXhGUS7iJbjbaDJUWVsHGQd8eE8LUqmVfCLd+ 4/tBhJN8Hl1kC9jbIOajbFvUry5Xk5O/1ZbbfojuGOg5F87M/d9YhOrVNgo8sWjr7WVUjU5UHvUPE imVR1PzEV2uiIFFjJFio6EFvNEkFuvoraKrwtR7oMvJi58R7KCrK1oKw3YwqbqDpUFjYLXyYqQKPt 3qwTdwReXKPPaCyfcUesptybV/ov3Rf6cOdHZ+3NoACe2RnXruCzsgqpyKmR1fVBFy4sSIkEFgXzd DNnxHauA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIT2q-0008IK-Tb; Tue, 15 May 2018 06:02:44 +0000 Received: from thoth.sbs.de ([192.35.17.2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fISyp-0005GJ-Bi for linux-arm-kernel@lists.infradead.org; Tue, 15 May 2018 05:58:40 +0000 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w4F5wJIo009053 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 May 2018 07:58:19 +0200 Received: from md1f2u6c.zg.swisshotel-zug.ch ([167.87.56.156]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w4F5wHpY000761; Tue, 15 May 2018 07:58:19 +0200 From: Jan Kiszka To: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/8] PCI: Rename device node parameter of of_pci_get_host_bridge_resources() Date: Tue, 15 May 2018 07:58:11 +0200 Message-Id: <4df503604897aebbcb6e7ab98ef5f24916c6d382.1526363896.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_225835_792284_709ED242 X-CRM114-Status: GOOD ( 13.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Zapolskiy MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jan Kiszka We will add a real device parameter to this function soon. Signed-off-by: Jan Kiszka Tested-by: Vladimir Zapolskiy Reviewed-by: Vladimir Zapolskiy --- drivers/pci/of.c | 18 +++++++++--------- include/linux/of_pci.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index a28355c273ae..8d4778ef5806 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -245,7 +245,7 @@ EXPORT_SYMBOL_GPL(of_pci_check_probe_only); #if defined(CONFIG_OF_ADDRESS) /** * of_pci_get_host_bridge_resources - Parse PCI host bridge resources from DT - * @dev: device node of the host bridge having the range property + * @dev_node: device node of the host bridge having the range property * @busno: bus number associated with the bridge root bus * @bus_max: maximum number of buses for this bridge * @resources: list where the range of resources will be added after DT parsing @@ -262,7 +262,7 @@ EXPORT_SYMBOL_GPL(of_pci_check_probe_only); * It returns zero if the range parsing has been successful or a standard error * value if it failed. */ -int of_pci_get_host_bridge_resources(struct device_node *dev, +int of_pci_get_host_bridge_resources(struct device_node *dev_node, unsigned char busno, unsigned char bus_max, struct list_head *resources, resource_size_t *io_base) { @@ -281,15 +281,15 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, if (!bus_range) return -ENOMEM; - pr_info("host bridge %pOF ranges:\n", dev); + pr_info("host bridge %pOF ranges:\n", dev_node); - err = of_pci_parse_bus_range(dev, bus_range); + err = of_pci_parse_bus_range(dev_node, bus_range); if (err) { bus_range->start = busno; bus_range->end = bus_max; bus_range->flags = IORESOURCE_BUS; pr_info(" No bus range found for %pOF, using %pR\n", - dev, bus_range); + dev_node, bus_range); } else { if (bus_range->end > bus_range->start + bus_max) bus_range->end = bus_range->start + bus_max; @@ -297,7 +297,7 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, pci_add_resource(resources, bus_range); /* Check for ranges property */ - err = of_pci_range_parser_init(&parser, dev); + err = of_pci_range_parser_init(&parser, dev_node); if (err) goto parse_failed; @@ -327,7 +327,7 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, goto parse_failed; } - err = of_pci_range_to_resource(&range, dev, res); + err = of_pci_range_to_resource(&range, dev_node, res); if (err) { kfree(res); continue; @@ -336,13 +336,13 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, if (resource_type(res) == IORESOURCE_IO) { if (!io_base) { pr_err("I/O range found for %pOF. Please provide an io_base pointer to save CPU base address\n", - dev); + dev_node); err = -EINVAL; goto conversion_failed; } if (*io_base != (resource_size_t)OF_BAD_ADDR) pr_warn("More than one I/O resource converted for %pOF. CPU base address for old range lost!\n", - dev); + dev_node); *io_base = range.cpu_addr; } diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index 091033a6b836..74eec1943ad2 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h @@ -71,11 +71,11 @@ of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin) #endif #if defined(CONFIG_OF_ADDRESS) -int of_pci_get_host_bridge_resources(struct device_node *dev, +int of_pci_get_host_bridge_resources(struct device_node *dev_node, unsigned char busno, unsigned char bus_max, struct list_head *resources, resource_size_t *io_base); #else -static inline int of_pci_get_host_bridge_resources(struct device_node *dev, +static inline int of_pci_get_host_bridge_resources(struct device_node *dev_node, unsigned char busno, unsigned char bus_max, struct list_head *resources, resource_size_t *io_base) {