From patchwork Tue May 15 05:58:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 10399919 X-Patchwork-Delegate: bhelgaas@google.com 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 76E4C601D2 for ; Tue, 15 May 2018 05:58:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F0912862D for ; Tue, 15 May 2018 05:58:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F2E32863E; Tue, 15 May 2018 05:58:44 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C6A32862D for ; Tue, 15 May 2018 05:58:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752089AbeEOF6l (ORCPT ); Tue, 15 May 2018 01:58:41 -0400 Received: from david.siemens.de ([192.35.17.14]:60858 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752044AbeEOF6l (ORCPT ); Tue, 15 May 2018 01:58:41 -0400 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w4F5wKi3017618 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 May 2018 07:58:20 +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 w4F5wHpa000761; 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 Cc: Vladimir Zapolskiy Subject: [PATCH v3 5/8] PCI: Replace pr_*() with dev_*() in of_pci_get_host_bridge_resources() Date: Tue, 15 May 2018 07:58:13 +0200 Message-Id: <95f6ca417e2bc74d15f707e577b098e46b4b3ba4.1526363896.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jan Kiszka Now that we have a device reference, make use of it for printing. Signed-off-by: Jan Kiszka Tested-by: Vladimir Zapolskiy Reviewed-by: Vladimir Zapolskiy --- drivers/pci/of.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index ac97491ba377..4f21514cb4e4 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -282,15 +282,15 @@ int of_pci_get_host_bridge_resources(struct device *dev, if (!bus_range) return -ENOMEM; - pr_info("host bridge %pOF ranges:\n", dev_node); + dev_info(dev, "host bridge %pOF ranges:\n", dev_node); 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_node, bus_range); + dev_info(dev, " No bus range found for %pOF, using %pR\n", + dev_node, bus_range); } else { if (bus_range->end > bus_range->start + bus_max) bus_range->end = bus_range->start + bus_max; @@ -302,7 +302,7 @@ int of_pci_get_host_bridge_resources(struct device *dev, if (err) goto parse_failed; - pr_debug("Parsing ranges property...\n"); + dev_dbg(dev, "Parsing ranges property...\n"); for_each_of_pci_range(&parser, &range) { /* Read next ranges element */ if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_IO) @@ -311,9 +311,9 @@ int of_pci_get_host_bridge_resources(struct device *dev, snprintf(range_type, 4, "MEM"); else snprintf(range_type, 4, "err"); - pr_info(" %s %#010llx..%#010llx -> %#010llx\n", range_type, - range.cpu_addr, range.cpu_addr + range.size - 1, - range.pci_addr); + dev_info(dev, " %s %#010llx..%#010llx -> %#010llx\n", + range_type, range.cpu_addr, + range.cpu_addr + range.size - 1, range.pci_addr); /* * If we failed translation or got a zero-sized region @@ -336,14 +336,16 @@ int of_pci_get_host_bridge_resources(struct device *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_err(dev, + "I/O range found for %pOF. Please provide an io_base pointer to save CPU base address\n", 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_node); + dev_warn(dev, + "More than one I/O resource converted for %pOF. CPU base address for old range lost!\n", + dev_node); *io_base = range.cpu_addr; }