Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7250843imm; Tue, 28 Aug 2018 08:46:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdavlVGLVTcs+UxOTM84JNvS49XsM+66xbqXgCwZ0zC3LKUDJSxGyrHRvw73H04zhCeeqIAI X-Received: by 2002:a17:902:9b92:: with SMTP id y18-v6mr2098125plp.239.1535471177630; Tue, 28 Aug 2018 08:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535471177; cv=none; d=google.com; s=arc-20160816; b=IYFLkowEDVHb7N3E3GPWO/aJkBNoI2XmmnnGyEk2SryNMV/tS/iBuItXzkB2Xlov9b xUPkFYv8gIiQ8xcauwVNePYHqfz0oSNuCaGUnYRGoxtS3aWl+y3plB4TD+hDM0wi53m3 fORlGTRFCmkKLSYAgdDDEblZOzwYqIzFUzP4TmKRqKJgt34uWhhXL3QcjeDgSVTFA4Ob euB31gQAEKf83cJWsVq88g/9PCz8bb6gnNvxSnUfPsDWijR8ZexjDYTtVkuRqFWv49aJ VMSkVLp7nITUXRA6108A714M0zqcRsd3ojYAPI0liesaOuz2ce+ON1gGNaE/IppqLtDy mpfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=wo7xqdq/4BpmCLGZCJhWKkDumVdRWLrZhbJLgJHCFFM=; b=Or1YEGjG0bfH7Sk1UMTJBy2YcOb2XxMf8nS/Kb9bt9zPYdGA/KC8XAGlORSVB4qe4Y LPKJIW29zNlpmFytWcI5/WbajnaHY7o5g8TUgW9CSQ4tdTzr2KwpfgsgdBgevuRGzB7P RF2Q7hT4GR2xC9evWVgz8sAJxpn5vI+moboP6mcM1GsVtzc4pBn01j+brG3Qt0w2J2km h3Wwanh4+rmLA3FEY8xUhYGUKV8+aoyhp5HCiegyUxFdAt3cYxgc8g7vjbbkfHlxVO4C 1cc3dreQxDieAvL8ggMTrChjA7bkArV4TMOqwgE98OcfESOP89AOW50MsExcsuq/9Tz8 o9Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184-v6si1252420pfe.249.2018.08.28.08.46.02; Tue, 28 Aug 2018 08:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbeH1Tg6 (ORCPT + 99 others); Tue, 28 Aug 2018 15:36:58 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:39252 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727456AbeH1Tg5 (ORCPT ); Tue, 28 Aug 2018 15:36:57 -0400 Received: by mail-oi0-f68.google.com with SMTP id c190-v6so3665816oig.6; Tue, 28 Aug 2018 08:44:43 -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:in-reply-to :references:in-reply-to; bh=wo7xqdq/4BpmCLGZCJhWKkDumVdRWLrZhbJLgJHCFFM=; b=rSo7sEZ/GfPYG6x2zoVprfx8iiDtQaNQ9mIIvqIbkloHh5fqP0e1ZaYhuPkXYxQpTY cdixO+AgtxoBmpgKFDfUm1rme9R87SSvk9UtrUcrSFLflJJdweYxLUFdkR2rl3krE3vJ 3akmkozV8XGr2Y3+/U2KZnauU0G2vnFETsubm8cPY4CFbuJsXPFu3tpSIhDedSdDlbOj i0L74H/i9XQHg4eb5/qrt4F7STEm1ZERg4fwdCMwsjCqgZj2DbQT/5CFFthz8Imk68Si 1ZVAfmVicV50dyzs7mOKzN5kEG+0ksbmfFHHrfW/F87knnv1YirQrWOLXPZC+1uOYebK 6I4A== X-Gm-Message-State: APzg51B75Nsk5rBxtXFG8hrVXUVXrJeWt8IbocwPbLkDKydyq6j8CTQt cCngNbWGuy0SRENVKO4JBKBKtPs= X-Received: by 2002:aca:91a:: with SMTP id 26-v6mr1573713oij.33.1535471082515; Tue, 28 Aug 2018 08:44:42 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id f4-v6sm1808331oic.52.2018.08.28.08.44.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 08:44:41 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org Cc: Ian Arkver , Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-media@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name Date: Tue, 28 Aug 2018 10:44:33 -0500 Message-Id: <20180828154433.5693-7-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180828154433.5693-1-robh@kernel.org> References: <20180828154433.5693-1-robh@kernel.org> In-Reply-To: <20180828015252.28511-44-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Steve Longerbeam Cc: Philipp Zabel Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: linux-media@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Rob Herring --- v2: - fix conditional use of node name vs devname for imx drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++----- drivers/staging/media/imx/imx-media-of.c | 4 ++-- drivers/staging/mt7621-eth/mdio.c | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c index b0be80f05767..3f48f5ceb6ea 100644 --- a/drivers/staging/media/imx/imx-media-dev.c +++ b/drivers/staging/media/imx/imx-media-dev.c @@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, /* return -EEXIST if this asd already added */ if (find_async_subdev(imxmd, fwnode, devname)) { - dev_dbg(imxmd->md.dev, "%s: already added %s\n", - __func__, np ? np->name : devname); + if (np) + dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n", + __func__, np); + else + dev_dbg(imxmd->md.dev, "%s: already added %s\n", + __func__, devname); ret = -EEXIST; goto out; } @@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, if (fwnode) { asd->match_type = V4L2_ASYNC_MATCH_FWNODE; asd->match.fwnode = fwnode; + dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n", + __func__, np); } else { asd->match_type = V4L2_ASYNC_MATCH_DEVNAME; asd->match.device_name = devname; imxasd->pdev = pdev; + dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n", + __func__, devname); } list_add_tail(&imxasd->list, &imxmd->asd_list); imxmd->subdev_notifier.num_subdevs++; - dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n", - __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME"); - out: mutex_unlock(&imxmd->mutex); return ret; diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c index acde372c6795..163437e421c5 100644 --- a/drivers/staging/media/imx/imx-media-of.c +++ b/drivers/staging/media/imx/imx-media-of.c @@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np, int i, num_ports, ret; if (!of_device_is_available(sd_np)) { - dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__, - sd_np->name); + dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__, + sd_np); /* unavailable is not an error */ return 0; } diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c index 7ad0c4141205..9ffa8f771235 100644 --- a/drivers/staging/mt7621-eth/mdio.c +++ b/drivers/staging/mt7621-eth/mdio.c @@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac, _port = of_get_property(phy_node, "reg", NULL); if (!_port || (be32_to_cpu(*_port) >= 0x20)) { - pr_err("%s: invalid port id\n", phy_node->name); + pr_err("%pOFn: invalid port id\n", phy_node); return -EINVAL; } port = be32_to_cpu(*_port); @@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth) eth->mii_bus->priv = eth; eth->mii_bus->parent = eth->dev; - snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name); + snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np); err = of_mdiobus_register(eth->mii_bus, mii_np); if (err) goto err_free_bus; -- 2.17.1