From patchwork Tue Jul 18 21:43:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 9849787 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 12D3560392 for ; Tue, 18 Jul 2017 21:57:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDEF8285FD for ; Tue, 18 Jul 2017 21:57:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E21AD28600; Tue, 18 Jul 2017 21:57:48 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3FEEF285FD for ; Tue, 18 Jul 2017 21:57:48 +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: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:In-Reply-To: References:List-Owner; bh=hAzEEcHDmjFWNJSa9VFQ/EJVGc6AObDrJk0q8K47Fps=; b=s4x 96I6daWseiiZyeplMPTpN8ZRwCWUXFe1nm82JUMSkmsroK0/Ak2g2nqxqFxDsLZVY5MUftRjZuJBN f0vJrN7sF3p6Wh8YN0CPRh3YgUhRQI1TT7yPuoJI5w1StWDgV0wzNN7Qlbjlpab1NfMPkAFP17GuV sVWLGx4AmWXZAUSScxDu1Ncwsx2Z5TkNPZKggxMD5XWm4vILjjbAu7tCZCg6u7rlu6l/BJ66AoMIH yK+lwG+k0NtbYeNnNMv0qBkW3lczQuqWRD1loGwE/uz5dzykxGihMkZQ/VyC8sQCNx8Af21QZv4Ic 8toFYkzuLBt9O99szTIPBqL0/PwG2jw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXaUz-0002tP-Ck; Tue, 18 Jul 2017 21:57:45 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXaUe-0002Co-P9 for linux-arm-kernel@bombadil.infradead.org; Tue, 18 Jul 2017 21:57:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FlGD/awA1JBCHc24nfSbJdKXz6jjSi6L+7b8kfSyiB0=; b=EWbmhOefouF1no+SQ1m2c9n6A 0mLJR76wvb2VrCInao8e4xAsGvl8Wb5tP1lSbFZvkkrs1QTL2HWN6E+Lc1uj38b24y2hxDPj8t30r Z5y0P71BavFR37VaFmDY4e7qYt03W2akchfTJAupsLsOqIQ7aY7iCZUACAQ5CA7qrUNwoRZ/hantV T3cStX/hnnaBaJXRUbjeM+TvJ6ohWsScLdzK66WaPj4TwSAHCzBg7+1/Hp8bZgiqYoSRuxWAmChc2 +JV50zV1lcxLoiAZILgZP0vDFxwsxzrVoqhayI59xcWPEJJ46XV4ckHYX2wSKUO8W12UaESy4/HU1 Qxut1nVkg==; Received: from mail-pg0-f67.google.com ([74.125.83.67]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXaIq-0006QT-9z for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2017 21:45:14 +0000 Received: by mail-pg0-f67.google.com with SMTP id d193so4332857pgc.2 for ; Tue, 18 Jul 2017 14:44:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FlGD/awA1JBCHc24nfSbJdKXz6jjSi6L+7b8kfSyiB0=; b=aCajHG1jilY851+KFRH2j/+aI3TbOWN0fWB8ipdALiHfz6ViRQpVJPb2p+byfZ3zKZ MQqPU3U1e8F805jdw2S3FouivcugUfItQAYmIAUrrINqYLCxGWB3UxX+GECfOSKqTrZ8 6UzuXVhMUru603hMa6vrSsMR1bF/tFtslu11CbUWSw12Xx3JFOVmR6a8ZVTdkKHu0zu1 qKFUC1h5viMpgjEYKfOOLO/1FzyTjVqVfhA5UZYZZaNuC2SRJatBrYtdzzBSfzXCI0rx PrY8dRNaPn6dQnAVjVIFKiJht6U9vEQoM/C66sZZv/133u1Sr/CqYzBdAQadA27nqSE7 bEuQ== X-Gm-Message-State: AIVw113zTSUlM+QiqpUaS24maKIPQChQWqsH0gpj3RGdt1zugScgWR7Q ujL0U/xi8Htsfg== X-Received: by 10.84.224.195 with SMTP id k3mr3885546pln.72.1500414290752; Tue, 18 Jul 2017 14:44:50 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id r207sm7186560pfr.106.2017.07.18.14.44.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:44:50 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas Subject: [PATCH] PCI: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:43:21 -0500 Message-Id: <20170718214339.7774-41-robh@kernel.org> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170718_224512_494608_45A7B729 X-CRM114-Status: GOOD ( 19.68 ) 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: Thomas Petazzoni , devicetree@vger.kernel.org, Jason Cooper , Benjamin Herrenschmidt , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Hunter , Thierry Reding , Paul Mackerras , Michael Ellerman , linux-tegra@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org 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 Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-tegra@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Tyrel Datwyler --- drivers/pci/host/pci-mvebu.c | 8 ++++---- drivers/pci/host/pci-tegra.c | 3 +-- drivers/pci/hotplug/pnv_php.c | 4 ++-- drivers/pci/hotplug/rpadlpar_core.c | 4 ++-- drivers/pci/hotplug/rpaphp_core.c | 2 +- drivers/pci/hotplug/rpaphp_pci.c | 4 ++-- drivers/pci/hotplug/rpaphp_slot.c | 4 ++-- drivers/pci/pci-sysfs.c | 4 ++-- drivers/pci/pci.c | 4 ++-- 9 files changed, 18 insertions(+), 19 deletions(-) -- 2.11.0 diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index f353a6eb2f01..424982997eb9 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -1054,8 +1054,8 @@ static int mvebu_pcie_parse_port(struct mvebu_pcie *pcie, port->pcie = pcie; if (of_property_read_u32(child, "marvell,pcie-port", &port->port)) { - dev_warn(dev, "ignoring %s, missing pcie-port property\n", - of_node_full_name(child)); + dev_warn(dev, "ignoring %pOF, missing pcie-port property\n", + child); goto skip; } @@ -1106,8 +1106,8 @@ static int mvebu_pcie_parse_port(struct mvebu_pcie *pcie, } if (flags & OF_GPIO_ACTIVE_LOW) { - dev_info(dev, "%s: reset gpio is active low\n", - of_node_full_name(child)); + dev_info(dev, "%pOF: reset gpio is active low\n", + child); gpio_flags = GPIOF_ACTIVE_LOW | GPIOF_OUT_INIT_LOW; } else { diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index b3722b7709df..7eb9be5ae357 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -1703,8 +1703,7 @@ static int tegra_pcie_get_legacy_regulators(struct tegra_pcie *pcie) pcie->num_supplies = 2; if (pcie->num_supplies == 0) { - dev_err(dev, "device %s not supported in legacy mode\n", - np->full_name); + dev_err(dev, "device %pOF not supported in legacy mode\n", np); return -ENODEV; } diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 7c203198b582..74f6a17e4614 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -163,8 +163,8 @@ static void pnv_php_detach_device_nodes(struct device_node *parent) of_node_put(dn); refcount = kref_read(&dn->kobj.kref); if (refcount != 1) - pr_warn("Invalid refcount %d on <%s>\n", - refcount, of_node_full_name(dn)); + pr_warn("Invalid refcount %d on <%pOF>\n", + refcount, dn); of_detach_node(dn); } diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 3f93a4e79595..a3449d717a99 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -150,8 +150,8 @@ static void dlpar_pci_add_bus(struct device_node *dn) /* Add EADS device to PHB bus, adding new entry to bus->devices */ dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); if (!dev) { - printk(KERN_ERR "%s: failed to create pci dev for %s\n", - __func__, dn->full_name); + printk(KERN_ERR "%s: failed to create pci dev for %pOF\n", + __func__, dn); return; } diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 8d132024f06e..1e29abaaea08 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c @@ -318,7 +318,7 @@ int rpaphp_add_slot(struct device_node *dn) if (!is_php_dn(dn, &indexes, &names, &types, &power_domains)) return 0; - dbg("Entry %s: dn->full_name=%s\n", __func__, dn->full_name); + dbg("Entry %s: dn=%pOF\n", __func__, dn); /* register PCI devices */ name = (char *) &names[1]; diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index ea41ea1d3c00..32aabc533be8 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c @@ -95,7 +95,7 @@ int rpaphp_enable_slot(struct slot *slot) bus = pci_find_bus_by_node(slot->dn); if (!bus) { - err("%s: no pci_bus for dn %s\n", __func__, slot->dn->full_name); + err("%s: no pci_bus for dn %pOF\n", __func__, slot->dn); return -EINVAL; } @@ -125,7 +125,7 @@ int rpaphp_enable_slot(struct slot *slot) if (rpaphp_debug) { struct pci_dev *dev; - dbg("%s: pci_devs of slot[%s]\n", __func__, slot->dn->full_name); + dbg("%s: pci_devs of slot[%pOF]\n", __func__, slot->dn); list_for_each_entry(dev, &bus->devices, bus_list) dbg("\t%s\n", pci_name(dev)); } diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index 388c4d8fcdd1..489862360f2c 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c @@ -122,8 +122,8 @@ int rpaphp_register_slot(struct slot *slot) int retval; int slotno = -1; - dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", - __func__, slot->dn->full_name, slot->index, slot->name, + dbg("%s registering slot:path[%pOF] index[%x], name[%s] pdomain[%x] type[%d]\n", + __func__, slot->dn, slot->index, slot->name, slot->power_domain, slot->type); /* should not try to register the same slot twice */ diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 2f3780b50723..33d4df7ed591 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -556,9 +556,9 @@ static ssize_t devspec_show(struct device *dev, struct pci_dev *pdev = to_pci_dev(dev); struct device_node *np = pci_device_to_OF_node(pdev); - if (np == NULL || np->full_name == NULL) + if (np == NULL) return 0; - return sprintf(buf, "%s", np->full_name); + return sprintf(buf, "%pOF", np); } static DEVICE_ATTR_RO(devspec); #endif diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index af0cc3456dc1..e8e40dea2842 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5363,8 +5363,8 @@ static int of_pci_bus_find_domain_nr(struct device *parent) use_dt_domains = 0; domain = pci_get_new_domain_nr(); } else { - dev_err(parent, "Node %s has inconsistent \"linux,pci-domain\" property in DT\n", - parent->of_node->full_name); + dev_err(parent, "Node %pOF has inconsistent \"linux,pci-domain\" property in DT\n", + parent->of_node); domain = -1; }