All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-18 21:43   ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-18 21:43 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-kernel, devicetree, Kyungmin Park, Andrzej Hajda, Lad,
	Prabhakar, Songjun Wu, Sylwester Nawrocki, Kukjin Kim,
	Krzysztof Kozlowski, Javier Martinez Canillas, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Matthias Brugger, Laurent Pinchart,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon,
	Michal Simek, Sören Brinkmann, linux-media,
	linux-arm-kernel, linux-samsung-soc, linux-mediatek,
	linux-renesas-soc

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 <robh@kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Songjun Wu <songjun.wu@microchip.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Cc: Houlong Wei <houlong.wei@mediatek.com>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-media@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
---
 drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
 drivers/media/i2c/s5k5baf.c                    |  7 ++--
 drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
 drivers/media/platform/atmel/atmel-isc.c       |  4 +-
 drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
 drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
 drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
 drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
 drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
 drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
 drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
 drivers/media/platform/omap3isp/isp.c          |  8 ++--
 drivers/media/platform/pxa_camera.c            |  2 +-
 drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
 drivers/media/platform/soc_camera/soc_camera.c |  6 +--
 drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
 drivers/media/v4l2-core/v4l2-async.c           |  4 +-
 drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
 include/media/v4l2-clk.h                       |  4 +-
 19 files changed, 71 insertions(+), 83 deletions(-)

diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index f434fb2ee6fc..cdc4f2392ef9 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)

 	node_ep = of_graph_get_next_endpoint(node, NULL);
 	if (!node_ep) {
-		dev_warn(dev, "no endpoint defined for node: %s\n",
-						node->full_name);
+		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
 		return 0;
 	}

diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 962051b9939d..9c22fc963901 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)

 	node_ep = of_graph_get_next_endpoint(node, NULL);
 	if (!node_ep) {
-		dev_err(dev, "no endpoint defined at node %s\n",
-			node->full_name);
+		dev_err(dev, "no endpoint defined at node %pOF\n", node);
 		return -EINVAL;
 	}

@@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
 	case V4L2_MBUS_PARALLEL:
 		break;
 	default:
-		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
-			node->full_name);
+		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
+			node);
 		return -EINVAL;
 	}

diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 466aba8b0e00..dfcc484cab89 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)

 		rem = of_graph_get_remote_port_parent(endpoint);
 		if (!rem) {
-			dev_err(&pdev->dev, "Remote device at %s not found\n",
-				endpoint->full_name);
+			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
+				endpoint);
 			goto done;
 		}

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index d6534252cdcd..b2c66b239cf2 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)

 		rem = of_graph_get_remote_port_parent(epn);
 		if (!rem) {
-			dev_notice(dev, "Remote device at %s not found\n",
-				   of_node_full_name(epn));
+			dev_notice(dev, "Remote device at %pOF not found\n",
+				   epn);
 			continue;
 		}

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index d78580f9e431..0a7aefa22c67 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
 			vpif_obj.config->chan_config->inputs[i].subdev_name =
 				(char *)to_of_node(subdev->fwnode)->full_name;
 			vpif_dbg(2, debug,
-				 "%s: setting input %d subdev_name = %s\n",
+				 "%s: setting input %d subdev_name = %pOF\n",
 				 __func__, i,
-				 to_of_node(subdev->fwnode)->full_name);
+				 to_of_node(subdev->fwnode));
 			return 0;
 		}
 	}
@@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
 			dev_err(&pdev->dev, "Could not parse the endpoint\n");
 			goto done;
 		}
-		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
-			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
+		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
+			endpoint, bus_cfg.bus.parallel.bus_width);
 		flags = bus_cfg.bus.parallel.flags;

 		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
@@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)

 		rem = of_graph_get_remote_port_parent(endpoint);
 		if (!rem) {
-			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
-				endpoint->full_name);
+			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
+				endpoint);
 			goto done;
 		}

-		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
-			rem->name, rem->full_name);
+		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
+			rem->name, rem);
 		sdinfo->name = rem->full_name;

 		pdata->asd[i] = devm_kzalloc(&pdev->dev,
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 340d906db370..5ddb2321e9e4 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,

 	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
 	if (!sensor->drvdata) {
-		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
-							 node->full_name);
+		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
+							 node);
 		return -EINVAL;
 	}

@@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
 	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
 	ret = of_property_read_u32(port, "reg", &tmp);
 	if (ret < 0) {
-		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
-							 port->full_name);
+		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
+							 port);
 		of_node_put(port);
 		return ret;
 	}
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index 7d3ec5cc6608..388a964cbf76 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)

 	if (!drv_data || fimc->index >= drv_data->num_instances ||
 						fimc->index < 0) {
-		dev_err(dev, "Wrong %s node alias\n",
-					dev->of_node->full_name);
+		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
 		return -EINVAL;
 	}

diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 7d1cf78846c4..d4656d5175d7 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 	rem = of_graph_get_remote_port_parent(ep);
 	of_node_put(ep);
 	if (rem == NULL) {
-		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
-							ep->full_name);
+		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
+							ep);
 		return 0;
 	}

@@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 		 */
 		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
 	} else {
-		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
-			 endpoint.base.port, rem->full_name);
+		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
+			 endpoint.base.port, rem);
 	}
 	/*
 	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index 98c89873c2dc..560aadabcb11 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,

 	node = of_graph_get_next_endpoint(node, NULL);
 	if (!node) {
-		dev_err(&pdev->dev, "No port node at %s\n",
-				pdev->dev.of_node->full_name);
+		dev_err(&pdev->dev, "No port node at %pOF\n",
+				pdev->dev.of_node);
 		return -EINVAL;
 	}
 	/* Get port node and validate MIPI-CSI channel id. */
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
index aa8f9fd1f1a2..e728d32d9408 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
@@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
 	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
 	if (!larb_node) {
 		dev_err(dev,
-			"Missing mediadek,larb phandle in %s node\n",
-			node->full_name);
+			"Missing mediadek,larb phandle in %pOF node\n", node);
 		return -EINVAL;
 	}

 	larb_pdev = of_find_device_by_node(larb_node);
 	if (!larb_pdev) {
-		dev_warn(dev, "Waiting for larb device %s\n",
-			 larb_node->full_name);
+		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
 		of_node_put(larb_node);
 		return -EPROBE_DEFER;
 	}
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
index 81347558b24a..bbb24fb95b95 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
@@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
 			continue;

 		if (!of_device_is_available(node)) {
-			dev_err(dev, "Skipping disabled component %s\n",
-				node->full_name);
+			dev_err(dev, "Skipping disabled component %pOF\n",
+				node);
 			continue;
 		}

 		comp_type = (enum mtk_mdp_comp_type)of_id->data;
 		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
 		if (comp_id < 0) {
-			dev_warn(dev, "Skipping unknown component %s\n",
-				 node->full_name);
+			dev_warn(dev, "Skipping unknown component %pOF\n",
+				 node);
 			continue;
 		}

diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 9df64c189883..afbc5b7942f8 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
 	if (ret)
 		return ret;

-	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
-		to_of_node(fwnode)->full_name, vep.base.port);
+	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
+		to_of_node(fwnode), vep.base.port);

 	switch (vep.base.port) {
 	case ISP_OF_PHY_PARALLEL:
@@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
 		break;

 	default:
-		dev_warn(dev, "%s: invalid interface %u\n",
-			 to_of_node(fwnode)->full_name, vep.base.port);
+		dev_warn(dev, "%pOF: invalid interface %u\n",
+			 to_of_node(fwnode), vep.base.port);
 		break;
 	}

diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 399095170b6e..787ae4c3c343 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
 		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
 		of_node_put(remote);
 	} else {
-		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
+		dev_notice(dev, "no remote for %pOF\n", np);
 	}

 out:
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
index 77dff047c41c..142de447aaaa 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)

 	subdevs[0] = &vin->digital.asd;

-	vin_dbg(vin, "Found digital subdevice %s\n",
-		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
+	vin_dbg(vin, "Found digital subdevice %pOF\n",
+		to_of_node(subdevs[0]->match.fwnode.fwnode));

 	vin->notifier.num_subdevs = 1;
 	vin->notifier.subdevs = subdevs;
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 45a0429d75bb..8ba0cb88df64 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
 		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
 				  client->adapter->nr, client->addr);
 	else
-		v4l2_clk_name_of(clk_name, sizeof(clk_name),
-				 of_node_full_name(remote));
+		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);

 	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
 	if (IS_ERR(icd->clk)) {
@@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)

 		ren = of_graph_get_remote_port(epn);
 		if (!ren) {
-			dev_notice(dev, "no remote for %s\n",
-				   of_node_full_name(epn));
+			dev_notice(dev, "no remote for %pOF\n", epn);
 			continue;
 		}

diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index ac4704388920..9233ad0b1b6b 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		of_node_put(ep);
 		ep = next;

-		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);

 		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
 		if (ret < 0) {
-			dev_err(xdev->dev, "failed to parse link for %s\n",
-				ep->full_name);
+			dev_err(xdev->dev, "failed to parse link for %pOF\n",
+				ep);
 			continue;
 		}

@@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		 * the link.
 		 */
 		if (link.local_port >= local->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u for %s\n",
+			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
 				link.local_port,
-				to_of_node(link.local_node)->full_name);
+				to_of_node(link.local_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		local_pad = &local->pads[link.local_port];

 		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
-			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
-				to_of_node(link.local_node)->full_name,
+			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
+				to_of_node(link.local_node),
 				link.local_port);
 			v4l2_fwnode_put_link(&link);
 			continue;
@@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,

 		/* Skip DMA engines, they will be processed separately. */
 		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
-			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
-				to_of_node(link.local_node)->full_name,
+			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
+				to_of_node(link.local_node),
 				link.local_port);
 			v4l2_fwnode_put_link(&link);
 			continue;
@@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		ent = xvip_graph_find_entity(xdev,
 					     to_of_node(link.remote_node));
 		if (ent == NULL) {
-			dev_err(xdev->dev, "no entity found for %s\n",
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "no entity found for %pOF\n",
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -ENODEV;
 			break;
@@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		remote = ent->entity;

 		if (link.remote_port >= remote->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u on %s\n",
-				link.remote_port,
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
+				link.remote_port, link.remote_node);
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
 		of_node_put(ep);
 		ep = next;

-		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);

 		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
 		if (ret < 0) {
-			dev_err(xdev->dev, "failed to parse link for %s\n",
-				ep->full_name);
+			dev_err(xdev->dev, "failed to parse link for %pOF\n",
+				ep);
 			continue;
 		}

@@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
 		ent = xvip_graph_find_entity(xdev,
 					     to_of_node(link.remote_node));
 		if (ent == NULL) {
-			dev_err(xdev->dev, "no entity found for %s\n",
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "no entity found for %pOF\n",
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -ENODEV;
 			break;
 		}

 		if (link.remote_port >= ent->entity->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u on %s\n",
+			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
 				link.remote_port,
-				to_of_node(link.remote_node)->full_name);
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
 			continue;

 		if (entity->subdev) {
-			dev_err(xdev->dev, "duplicate subdev for node %s\n",
-				entity->node->full_name);
+			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
+				entity->node);
 			return -EINVAL;
 		}

@@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
 	struct device_node *ep = NULL;
 	int ret = 0;

-	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
+	dev_dbg(xdev->dev, "parsing node %pOF\n", node);

 	while (1) {
 		ep = of_graph_get_next_endpoint(node, ep);
 		if (ep == NULL)
 			break;

-		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);

 		remote = of_graph_get_remote_port_parent(ep);
 		if (remote == NULL) {
@@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,

 	ret = xvip_dma_init(xdev, dma, type, index);
 	if (ret < 0) {
-		dev_err(xdev->dev, "%s initialization failed\n",
-			node->full_name);
+		dev_err(xdev->dev, "%pOF initialization failed\n", node);
 		return ret;
 	}

diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 851f128eba22..0a385d1ff28c 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
 	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
 		return sd->fwnode == asd->match.fwnode.fwnode;

-	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
-			    of_node_full_name(
-				    to_of_node(asd->match.fwnode.fwnode)));
+	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
 }

 static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
index 297e10e69898..90628d7a04de 100644
--- a/drivers/media/v4l2-core/v4l2-clk.c
+++ b/drivers/media/v4l2-core/v4l2-clk.c
@@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)

 	/* if dev_name is not found, try use the OF name to find again  */
 	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
-		v4l2_clk_name_of(clk_name, sizeof(clk_name),
-				 of_node_full_name(dev->of_node));
+		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
 		clk = v4l2_clk_find(clk_name);
 	}

diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
index 2b94662d005c..7ec857f805a6 100644
--- a/include/media/v4l2-clk.h
+++ b/include/media/v4l2-clk.h
@@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
 #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
 			  "%d-%04x", adap, client)

-#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
-			  "of-%s", of_full_name)
+#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
+			  "of-%pOF", node)

 #endif
--
2.11.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-18 21:43   ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-18 21:43 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Andrew-CT Chen, Minghsiu Tsai, Songjun Wu, Andrzej Hajda, Lad,
	Prabhakar, Laurent Pinchart, Sylwester Nawrocki,
	linux-samsung-soc, Michal Simek, Krzysztof Kozlowski,
	Javier Martinez Canillas, Kukjin Kim, Sören Brinkmann,
	linux-media, devicetree, Houlong Wei, linux-mediatek,
	Matthias Brugger, linux-arm-kernel, Hyun Kwon, linux-kernel,
	linux-renesas-soc

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 <robh@kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Songjun Wu <songjun.wu@microchip.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Cc: Houlong Wei <houlong.wei@mediatek.com>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-media@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
---
 drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
 drivers/media/i2c/s5k5baf.c                    |  7 ++--
 drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
 drivers/media/platform/atmel/atmel-isc.c       |  4 +-
 drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
 drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
 drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
 drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
 drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
 drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
 drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
 drivers/media/platform/omap3isp/isp.c          |  8 ++--
 drivers/media/platform/pxa_camera.c            |  2 +-
 drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
 drivers/media/platform/soc_camera/soc_camera.c |  6 +--
 drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
 drivers/media/v4l2-core/v4l2-async.c           |  4 +-
 drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
 include/media/v4l2-clk.h                       |  4 +-
 19 files changed, 71 insertions(+), 83 deletions(-)

diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index f434fb2ee6fc..cdc4f2392ef9 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)

 	node_ep = of_graph_get_next_endpoint(node, NULL);
 	if (!node_ep) {
-		dev_warn(dev, "no endpoint defined for node: %s\n",
-						node->full_name);
+		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
 		return 0;
 	}

diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 962051b9939d..9c22fc963901 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)

 	node_ep = of_graph_get_next_endpoint(node, NULL);
 	if (!node_ep) {
-		dev_err(dev, "no endpoint defined at node %s\n",
-			node->full_name);
+		dev_err(dev, "no endpoint defined at node %pOF\n", node);
 		return -EINVAL;
 	}

@@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
 	case V4L2_MBUS_PARALLEL:
 		break;
 	default:
-		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
-			node->full_name);
+		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
+			node);
 		return -EINVAL;
 	}

diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 466aba8b0e00..dfcc484cab89 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)

 		rem = of_graph_get_remote_port_parent(endpoint);
 		if (!rem) {
-			dev_err(&pdev->dev, "Remote device at %s not found\n",
-				endpoint->full_name);
+			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
+				endpoint);
 			goto done;
 		}

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index d6534252cdcd..b2c66b239cf2 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)

 		rem = of_graph_get_remote_port_parent(epn);
 		if (!rem) {
-			dev_notice(dev, "Remote device at %s not found\n",
-				   of_node_full_name(epn));
+			dev_notice(dev, "Remote device at %pOF not found\n",
+				   epn);
 			continue;
 		}

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index d78580f9e431..0a7aefa22c67 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
 			vpif_obj.config->chan_config->inputs[i].subdev_name =
 				(char *)to_of_node(subdev->fwnode)->full_name;
 			vpif_dbg(2, debug,
-				 "%s: setting input %d subdev_name = %s\n",
+				 "%s: setting input %d subdev_name = %pOF\n",
 				 __func__, i,
-				 to_of_node(subdev->fwnode)->full_name);
+				 to_of_node(subdev->fwnode));
 			return 0;
 		}
 	}
@@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
 			dev_err(&pdev->dev, "Could not parse the endpoint\n");
 			goto done;
 		}
-		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
-			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
+		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
+			endpoint, bus_cfg.bus.parallel.bus_width);
 		flags = bus_cfg.bus.parallel.flags;

 		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
@@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)

 		rem = of_graph_get_remote_port_parent(endpoint);
 		if (!rem) {
-			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
-				endpoint->full_name);
+			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
+				endpoint);
 			goto done;
 		}

-		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
-			rem->name, rem->full_name);
+		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
+			rem->name, rem);
 		sdinfo->name = rem->full_name;

 		pdata->asd[i] = devm_kzalloc(&pdev->dev,
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 340d906db370..5ddb2321e9e4 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,

 	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
 	if (!sensor->drvdata) {
-		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
-							 node->full_name);
+		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
+							 node);
 		return -EINVAL;
 	}

@@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
 	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
 	ret = of_property_read_u32(port, "reg", &tmp);
 	if (ret < 0) {
-		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
-							 port->full_name);
+		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
+							 port);
 		of_node_put(port);
 		return ret;
 	}
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index 7d3ec5cc6608..388a964cbf76 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)

 	if (!drv_data || fimc->index >= drv_data->num_instances ||
 						fimc->index < 0) {
-		dev_err(dev, "Wrong %s node alias\n",
-					dev->of_node->full_name);
+		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
 		return -EINVAL;
 	}

diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 7d1cf78846c4..d4656d5175d7 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 	rem = of_graph_get_remote_port_parent(ep);
 	of_node_put(ep);
 	if (rem == NULL) {
-		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
-							ep->full_name);
+		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
+							ep);
 		return 0;
 	}

@@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 		 */
 		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
 	} else {
-		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
-			 endpoint.base.port, rem->full_name);
+		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
+			 endpoint.base.port, rem);
 	}
 	/*
 	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index 98c89873c2dc..560aadabcb11 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,

 	node = of_graph_get_next_endpoint(node, NULL);
 	if (!node) {
-		dev_err(&pdev->dev, "No port node at %s\n",
-				pdev->dev.of_node->full_name);
+		dev_err(&pdev->dev, "No port node at %pOF\n",
+				pdev->dev.of_node);
 		return -EINVAL;
 	}
 	/* Get port node and validate MIPI-CSI channel id. */
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
index aa8f9fd1f1a2..e728d32d9408 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
@@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
 	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
 	if (!larb_node) {
 		dev_err(dev,
-			"Missing mediadek,larb phandle in %s node\n",
-			node->full_name);
+			"Missing mediadek,larb phandle in %pOF node\n", node);
 		return -EINVAL;
 	}

 	larb_pdev = of_find_device_by_node(larb_node);
 	if (!larb_pdev) {
-		dev_warn(dev, "Waiting for larb device %s\n",
-			 larb_node->full_name);
+		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
 		of_node_put(larb_node);
 		return -EPROBE_DEFER;
 	}
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
index 81347558b24a..bbb24fb95b95 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
@@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
 			continue;

 		if (!of_device_is_available(node)) {
-			dev_err(dev, "Skipping disabled component %s\n",
-				node->full_name);
+			dev_err(dev, "Skipping disabled component %pOF\n",
+				node);
 			continue;
 		}

 		comp_type = (enum mtk_mdp_comp_type)of_id->data;
 		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
 		if (comp_id < 0) {
-			dev_warn(dev, "Skipping unknown component %s\n",
-				 node->full_name);
+			dev_warn(dev, "Skipping unknown component %pOF\n",
+				 node);
 			continue;
 		}

diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 9df64c189883..afbc5b7942f8 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
 	if (ret)
 		return ret;

-	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
-		to_of_node(fwnode)->full_name, vep.base.port);
+	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
+		to_of_node(fwnode), vep.base.port);

 	switch (vep.base.port) {
 	case ISP_OF_PHY_PARALLEL:
@@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
 		break;

 	default:
-		dev_warn(dev, "%s: invalid interface %u\n",
-			 to_of_node(fwnode)->full_name, vep.base.port);
+		dev_warn(dev, "%pOF: invalid interface %u\n",
+			 to_of_node(fwnode), vep.base.port);
 		break;
 	}

diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 399095170b6e..787ae4c3c343 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
 		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
 		of_node_put(remote);
 	} else {
-		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
+		dev_notice(dev, "no remote for %pOF\n", np);
 	}

 out:
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
index 77dff047c41c..142de447aaaa 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)

 	subdevs[0] = &vin->digital.asd;

-	vin_dbg(vin, "Found digital subdevice %s\n",
-		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
+	vin_dbg(vin, "Found digital subdevice %pOF\n",
+		to_of_node(subdevs[0]->match.fwnode.fwnode));

 	vin->notifier.num_subdevs = 1;
 	vin->notifier.subdevs = subdevs;
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 45a0429d75bb..8ba0cb88df64 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
 		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
 				  client->adapter->nr, client->addr);
 	else
-		v4l2_clk_name_of(clk_name, sizeof(clk_name),
-				 of_node_full_name(remote));
+		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);

 	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
 	if (IS_ERR(icd->clk)) {
@@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)

 		ren = of_graph_get_remote_port(epn);
 		if (!ren) {
-			dev_notice(dev, "no remote for %s\n",
-				   of_node_full_name(epn));
+			dev_notice(dev, "no remote for %pOF\n", epn);
 			continue;
 		}

diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index ac4704388920..9233ad0b1b6b 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		of_node_put(ep);
 		ep = next;

-		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);

 		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
 		if (ret < 0) {
-			dev_err(xdev->dev, "failed to parse link for %s\n",
-				ep->full_name);
+			dev_err(xdev->dev, "failed to parse link for %pOF\n",
+				ep);
 			continue;
 		}

@@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		 * the link.
 		 */
 		if (link.local_port >= local->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u for %s\n",
+			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
 				link.local_port,
-				to_of_node(link.local_node)->full_name);
+				to_of_node(link.local_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		local_pad = &local->pads[link.local_port];

 		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
-			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
-				to_of_node(link.local_node)->full_name,
+			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
+				to_of_node(link.local_node),
 				link.local_port);
 			v4l2_fwnode_put_link(&link);
 			continue;
@@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,

 		/* Skip DMA engines, they will be processed separately. */
 		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
-			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
-				to_of_node(link.local_node)->full_name,
+			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
+				to_of_node(link.local_node),
 				link.local_port);
 			v4l2_fwnode_put_link(&link);
 			continue;
@@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		ent = xvip_graph_find_entity(xdev,
 					     to_of_node(link.remote_node));
 		if (ent == NULL) {
-			dev_err(xdev->dev, "no entity found for %s\n",
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "no entity found for %pOF\n",
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -ENODEV;
 			break;
@@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		remote = ent->entity;

 		if (link.remote_port >= remote->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u on %s\n",
-				link.remote_port,
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
+				link.remote_port, link.remote_node);
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
 		of_node_put(ep);
 		ep = next;

-		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);

 		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
 		if (ret < 0) {
-			dev_err(xdev->dev, "failed to parse link for %s\n",
-				ep->full_name);
+			dev_err(xdev->dev, "failed to parse link for %pOF\n",
+				ep);
 			continue;
 		}

@@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
 		ent = xvip_graph_find_entity(xdev,
 					     to_of_node(link.remote_node));
 		if (ent == NULL) {
-			dev_err(xdev->dev, "no entity found for %s\n",
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "no entity found for %pOF\n",
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -ENODEV;
 			break;
 		}

 		if (link.remote_port >= ent->entity->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u on %s\n",
+			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
 				link.remote_port,
-				to_of_node(link.remote_node)->full_name);
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
 			continue;

 		if (entity->subdev) {
-			dev_err(xdev->dev, "duplicate subdev for node %s\n",
-				entity->node->full_name);
+			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
+				entity->node);
 			return -EINVAL;
 		}

@@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
 	struct device_node *ep = NULL;
 	int ret = 0;

-	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
+	dev_dbg(xdev->dev, "parsing node %pOF\n", node);

 	while (1) {
 		ep = of_graph_get_next_endpoint(node, ep);
 		if (ep == NULL)
 			break;

-		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);

 		remote = of_graph_get_remote_port_parent(ep);
 		if (remote == NULL) {
@@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,

 	ret = xvip_dma_init(xdev, dma, type, index);
 	if (ret < 0) {
-		dev_err(xdev->dev, "%s initialization failed\n",
-			node->full_name);
+		dev_err(xdev->dev, "%pOF initialization failed\n", node);
 		return ret;
 	}

diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 851f128eba22..0a385d1ff28c 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
 	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
 		return sd->fwnode == asd->match.fwnode.fwnode;

-	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
-			    of_node_full_name(
-				    to_of_node(asd->match.fwnode.fwnode)));
+	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
 }

 static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
index 297e10e69898..90628d7a04de 100644
--- a/drivers/media/v4l2-core/v4l2-clk.c
+++ b/drivers/media/v4l2-core/v4l2-clk.c
@@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)

 	/* if dev_name is not found, try use the OF name to find again  */
 	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
-		v4l2_clk_name_of(clk_name, sizeof(clk_name),
-				 of_node_full_name(dev->of_node));
+		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
 		clk = v4l2_clk_find(clk_name);
 	}

diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
index 2b94662d005c..7ec857f805a6 100644
--- a/include/media/v4l2-clk.h
+++ b/include/media/v4l2-clk.h
@@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
 #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
 			  "%d-%04x", adap, client)

-#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
-			  "of-%s", of_full_name)
+#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
+			  "of-%pOF", node)

 #endif
--
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-18 21:43   ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-18 21:43 UTC (permalink / raw)
  To: linux-arm-kernel

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 <robh@kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Songjun Wu <songjun.wu@microchip.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Cc: Houlong Wei <houlong.wei@mediatek.com>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Niklas S?derlund" <niklas.soderlund@ragnatech.se>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-media at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-samsung-soc at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-renesas-soc at vger.kernel.org
---
 drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
 drivers/media/i2c/s5k5baf.c                    |  7 ++--
 drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
 drivers/media/platform/atmel/atmel-isc.c       |  4 +-
 drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
 drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
 drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
 drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
 drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
 drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
 drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
 drivers/media/platform/omap3isp/isp.c          |  8 ++--
 drivers/media/platform/pxa_camera.c            |  2 +-
 drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
 drivers/media/platform/soc_camera/soc_camera.c |  6 +--
 drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
 drivers/media/v4l2-core/v4l2-async.c           |  4 +-
 drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
 include/media/v4l2-clk.h                       |  4 +-
 19 files changed, 71 insertions(+), 83 deletions(-)

diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index f434fb2ee6fc..cdc4f2392ef9 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)

 	node_ep = of_graph_get_next_endpoint(node, NULL);
 	if (!node_ep) {
-		dev_warn(dev, "no endpoint defined for node: %s\n",
-						node->full_name);
+		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
 		return 0;
 	}

diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 962051b9939d..9c22fc963901 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)

 	node_ep = of_graph_get_next_endpoint(node, NULL);
 	if (!node_ep) {
-		dev_err(dev, "no endpoint defined at node %s\n",
-			node->full_name);
+		dev_err(dev, "no endpoint defined at node %pOF\n", node);
 		return -EINVAL;
 	}

@@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
 	case V4L2_MBUS_PARALLEL:
 		break;
 	default:
-		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
-			node->full_name);
+		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
+			node);
 		return -EINVAL;
 	}

diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 466aba8b0e00..dfcc484cab89 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)

 		rem = of_graph_get_remote_port_parent(endpoint);
 		if (!rem) {
-			dev_err(&pdev->dev, "Remote device at %s not found\n",
-				endpoint->full_name);
+			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
+				endpoint);
 			goto done;
 		}

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index d6534252cdcd..b2c66b239cf2 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)

 		rem = of_graph_get_remote_port_parent(epn);
 		if (!rem) {
-			dev_notice(dev, "Remote device at %s not found\n",
-				   of_node_full_name(epn));
+			dev_notice(dev, "Remote device at %pOF not found\n",
+				   epn);
 			continue;
 		}

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index d78580f9e431..0a7aefa22c67 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
 			vpif_obj.config->chan_config->inputs[i].subdev_name =
 				(char *)to_of_node(subdev->fwnode)->full_name;
 			vpif_dbg(2, debug,
-				 "%s: setting input %d subdev_name = %s\n",
+				 "%s: setting input %d subdev_name = %pOF\n",
 				 __func__, i,
-				 to_of_node(subdev->fwnode)->full_name);
+				 to_of_node(subdev->fwnode));
 			return 0;
 		}
 	}
@@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
 			dev_err(&pdev->dev, "Could not parse the endpoint\n");
 			goto done;
 		}
-		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
-			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
+		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
+			endpoint, bus_cfg.bus.parallel.bus_width);
 		flags = bus_cfg.bus.parallel.flags;

 		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
@@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)

 		rem = of_graph_get_remote_port_parent(endpoint);
 		if (!rem) {
-			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
-				endpoint->full_name);
+			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
+				endpoint);
 			goto done;
 		}

-		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
-			rem->name, rem->full_name);
+		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
+			rem->name, rem);
 		sdinfo->name = rem->full_name;

 		pdata->asd[i] = devm_kzalloc(&pdev->dev,
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 340d906db370..5ddb2321e9e4 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,

 	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
 	if (!sensor->drvdata) {
-		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
-							 node->full_name);
+		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
+							 node);
 		return -EINVAL;
 	}

@@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
 	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
 	ret = of_property_read_u32(port, "reg", &tmp);
 	if (ret < 0) {
-		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
-							 port->full_name);
+		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
+							 port);
 		of_node_put(port);
 		return ret;
 	}
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index 7d3ec5cc6608..388a964cbf76 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)

 	if (!drv_data || fimc->index >= drv_data->num_instances ||
 						fimc->index < 0) {
-		dev_err(dev, "Wrong %s node alias\n",
-					dev->of_node->full_name);
+		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
 		return -EINVAL;
 	}

diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 7d1cf78846c4..d4656d5175d7 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 	rem = of_graph_get_remote_port_parent(ep);
 	of_node_put(ep);
 	if (rem == NULL) {
-		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
-							ep->full_name);
+		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
+							ep);
 		return 0;
 	}

@@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 		 */
 		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
 	} else {
-		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
-			 endpoint.base.port, rem->full_name);
+		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
+			 endpoint.base.port, rem);
 	}
 	/*
 	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index 98c89873c2dc..560aadabcb11 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,

 	node = of_graph_get_next_endpoint(node, NULL);
 	if (!node) {
-		dev_err(&pdev->dev, "No port node at %s\n",
-				pdev->dev.of_node->full_name);
+		dev_err(&pdev->dev, "No port node at %pOF\n",
+				pdev->dev.of_node);
 		return -EINVAL;
 	}
 	/* Get port node and validate MIPI-CSI channel id. */
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
index aa8f9fd1f1a2..e728d32d9408 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
@@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
 	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
 	if (!larb_node) {
 		dev_err(dev,
-			"Missing mediadek,larb phandle in %s node\n",
-			node->full_name);
+			"Missing mediadek,larb phandle in %pOF node\n", node);
 		return -EINVAL;
 	}

 	larb_pdev = of_find_device_by_node(larb_node);
 	if (!larb_pdev) {
-		dev_warn(dev, "Waiting for larb device %s\n",
-			 larb_node->full_name);
+		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
 		of_node_put(larb_node);
 		return -EPROBE_DEFER;
 	}
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
index 81347558b24a..bbb24fb95b95 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
@@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
 			continue;

 		if (!of_device_is_available(node)) {
-			dev_err(dev, "Skipping disabled component %s\n",
-				node->full_name);
+			dev_err(dev, "Skipping disabled component %pOF\n",
+				node);
 			continue;
 		}

 		comp_type = (enum mtk_mdp_comp_type)of_id->data;
 		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
 		if (comp_id < 0) {
-			dev_warn(dev, "Skipping unknown component %s\n",
-				 node->full_name);
+			dev_warn(dev, "Skipping unknown component %pOF\n",
+				 node);
 			continue;
 		}

diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 9df64c189883..afbc5b7942f8 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
 	if (ret)
 		return ret;

-	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
-		to_of_node(fwnode)->full_name, vep.base.port);
+	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
+		to_of_node(fwnode), vep.base.port);

 	switch (vep.base.port) {
 	case ISP_OF_PHY_PARALLEL:
@@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
 		break;

 	default:
-		dev_warn(dev, "%s: invalid interface %u\n",
-			 to_of_node(fwnode)->full_name, vep.base.port);
+		dev_warn(dev, "%pOF: invalid interface %u\n",
+			 to_of_node(fwnode), vep.base.port);
 		break;
 	}

diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 399095170b6e..787ae4c3c343 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
 		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
 		of_node_put(remote);
 	} else {
-		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
+		dev_notice(dev, "no remote for %pOF\n", np);
 	}

 out:
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
index 77dff047c41c..142de447aaaa 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)

 	subdevs[0] = &vin->digital.asd;

-	vin_dbg(vin, "Found digital subdevice %s\n",
-		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
+	vin_dbg(vin, "Found digital subdevice %pOF\n",
+		to_of_node(subdevs[0]->match.fwnode.fwnode));

 	vin->notifier.num_subdevs = 1;
 	vin->notifier.subdevs = subdevs;
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 45a0429d75bb..8ba0cb88df64 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
 		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
 				  client->adapter->nr, client->addr);
 	else
-		v4l2_clk_name_of(clk_name, sizeof(clk_name),
-				 of_node_full_name(remote));
+		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);

 	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
 	if (IS_ERR(icd->clk)) {
@@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)

 		ren = of_graph_get_remote_port(epn);
 		if (!ren) {
-			dev_notice(dev, "no remote for %s\n",
-				   of_node_full_name(epn));
+			dev_notice(dev, "no remote for %pOF\n", epn);
 			continue;
 		}

diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index ac4704388920..9233ad0b1b6b 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		of_node_put(ep);
 		ep = next;

-		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);

 		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
 		if (ret < 0) {
-			dev_err(xdev->dev, "failed to parse link for %s\n",
-				ep->full_name);
+			dev_err(xdev->dev, "failed to parse link for %pOF\n",
+				ep);
 			continue;
 		}

@@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		 * the link.
 		 */
 		if (link.local_port >= local->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u for %s\n",
+			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
 				link.local_port,
-				to_of_node(link.local_node)->full_name);
+				to_of_node(link.local_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		local_pad = &local->pads[link.local_port];

 		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
-			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
-				to_of_node(link.local_node)->full_name,
+			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
+				to_of_node(link.local_node),
 				link.local_port);
 			v4l2_fwnode_put_link(&link);
 			continue;
@@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,

 		/* Skip DMA engines, they will be processed separately. */
 		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
-			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
-				to_of_node(link.local_node)->full_name,
+			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
+				to_of_node(link.local_node),
 				link.local_port);
 			v4l2_fwnode_put_link(&link);
 			continue;
@@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		ent = xvip_graph_find_entity(xdev,
 					     to_of_node(link.remote_node));
 		if (ent == NULL) {
-			dev_err(xdev->dev, "no entity found for %s\n",
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "no entity found for %pOF\n",
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -ENODEV;
 			break;
@@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
 		remote = ent->entity;

 		if (link.remote_port >= remote->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u on %s\n",
-				link.remote_port,
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
+				link.remote_port, link.remote_node);
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
 		of_node_put(ep);
 		ep = next;

-		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);

 		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
 		if (ret < 0) {
-			dev_err(xdev->dev, "failed to parse link for %s\n",
-				ep->full_name);
+			dev_err(xdev->dev, "failed to parse link for %pOF\n",
+				ep);
 			continue;
 		}

@@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
 		ent = xvip_graph_find_entity(xdev,
 					     to_of_node(link.remote_node));
 		if (ent == NULL) {
-			dev_err(xdev->dev, "no entity found for %s\n",
-				to_of_node(link.remote_node)->full_name);
+			dev_err(xdev->dev, "no entity found for %pOF\n",
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -ENODEV;
 			break;
 		}

 		if (link.remote_port >= ent->entity->num_pads) {
-			dev_err(xdev->dev, "invalid port number %u on %s\n",
+			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
 				link.remote_port,
-				to_of_node(link.remote_node)->full_name);
+				to_of_node(link.remote_node));
 			v4l2_fwnode_put_link(&link);
 			ret = -EINVAL;
 			break;
@@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
 			continue;

 		if (entity->subdev) {
-			dev_err(xdev->dev, "duplicate subdev for node %s\n",
-				entity->node->full_name);
+			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
+				entity->node);
 			return -EINVAL;
 		}

@@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
 	struct device_node *ep = NULL;
 	int ret = 0;

-	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
+	dev_dbg(xdev->dev, "parsing node %pOF\n", node);

 	while (1) {
 		ep = of_graph_get_next_endpoint(node, ep);
 		if (ep == NULL)
 			break;

-		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
+		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);

 		remote = of_graph_get_remote_port_parent(ep);
 		if (remote == NULL) {
@@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,

 	ret = xvip_dma_init(xdev, dma, type, index);
 	if (ret < 0) {
-		dev_err(xdev->dev, "%s initialization failed\n",
-			node->full_name);
+		dev_err(xdev->dev, "%pOF initialization failed\n", node);
 		return ret;
 	}

diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 851f128eba22..0a385d1ff28c 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
 	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
 		return sd->fwnode == asd->match.fwnode.fwnode;

-	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
-			    of_node_full_name(
-				    to_of_node(asd->match.fwnode.fwnode)));
+	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
 }

 static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
index 297e10e69898..90628d7a04de 100644
--- a/drivers/media/v4l2-core/v4l2-clk.c
+++ b/drivers/media/v4l2-core/v4l2-clk.c
@@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)

 	/* if dev_name is not found, try use the OF name to find again  */
 	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
-		v4l2_clk_name_of(clk_name, sizeof(clk_name),
-				 of_node_full_name(dev->of_node));
+		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
 		clk = v4l2_clk_find(clk_name);
 	}

diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
index 2b94662d005c..7ec857f805a6 100644
--- a/include/media/v4l2-clk.h
+++ b/include/media/v4l2-clk.h
@@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
 #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
 			  "%d-%04x", adap, client)

-#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
-			  "of-%s", of_full_name)
+#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
+			  "of-%pOF", node)

 #endif
--
2.11.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-18 21:43   ` Rob Herring
  (?)
  (?)
@ 2017-07-19  8:28     ` Niklas Söderlund
  -1 siblings, 0 replies; 38+ messages in thread
From: Niklas Söderlund @ 2017-07-19  8:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Sylwester Nawrocki,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Guennadi Liakhovetski, Hyun Kwon, Michal Simek,
	Sören Brinkmann, linux-media, linux-arm-kernel,
	linux-samsung-soc, linux-mediatek, linux-renesas-soc

On 2017-07-18 16:43:13 -0500, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org

For rcar-vin/rcar-core.c:
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  8:28     ` Niklas Söderlund
  0 siblings, 0 replies; 38+ messages in thread
From: Niklas Söderlund @ 2017-07-19  8:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Sylwester Nawrocki,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Guennadi Liakhovetski, Hyun Kwon, Michal Simek

On 2017-07-18 16:43:13 -0500, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org

For rcar-vin/rcar-core.c:
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  8:28     ` Niklas Söderlund
  0 siblings, 0 replies; 38+ messages in thread
From: Niklas Söderlund @ 2017-07-19  8:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Sylwester Nawrocki,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Guennadi Liakhovetski, Hyun Kwon, Michal Simek,
	Sören Brinkmann, linux-media, linux-arm-kernel,
	linux-samsung-soc, linux-mediatek, linux-renesas-soc

On 2017-07-18 16:43:13 -0500, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas S�derlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S�ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org

For rcar-vin/rcar-core.c:
Acked-by: Niklas S�derlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 

-- 
Regards,
Niklas S�derlund

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  8:28     ` Niklas Söderlund
  0 siblings, 0 replies; 38+ messages in thread
From: Niklas Söderlund @ 2017-07-19  8:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 2017-07-18 16:43:13 -0500, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas S?derlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-renesas-soc at vger.kernel.org

For rcar-vin/rcar-core.c:
Acked-by: Niklas S?derlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 

-- 
Regards,
Niklas S?derlund

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-18 21:43   ` Rob Herring
  (?)
@ 2017-07-19  8:55     ` Laurent Pinchart
  -1 siblings, 0 replies; 38+ messages in thread
From: Laurent Pinchart @ 2017-07-19  8:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Sylwester Nawrocki,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon,
	Michal Simek, Sören Brinkmann, linux-media,
	linux-arm-kernel, linux-samsung-soc, linux-mediatek,
	linux-renesas-soc

Hi Rob,

Thank you for the patch.

On Tuesday 18 Jul 2017 16:43:13 Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++-----------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)

For omap3isp and xilinx,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  8:55     ` Laurent Pinchart
  0 siblings, 0 replies; 38+ messages in thread
From: Laurent Pinchart @ 2017-07-19  8:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Sylwester Nawrocki,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon

Hi Rob,

Thank you for the patch.

On Tuesday 18 Jul 2017 16:43:13 Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++-----------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)

For omap3isp and xilinx,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  8:55     ` Laurent Pinchart
  0 siblings, 0 replies; 38+ messages in thread
From: Laurent Pinchart @ 2017-07-19  8:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Rob,

Thank you for the patch.

On Tuesday 18 Jul 2017 16:43:13 Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas S?derlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++-----------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)

For omap3isp and xilinx,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-18 21:43   ` Rob Herring
  (?)
@ 2017-07-19  9:41     ` Sylwester Nawrocki
  -1 siblings, 0 replies; 38+ messages in thread
From: Sylwester Nawrocki @ 2017-07-19  9:41 UTC (permalink / raw)
  To: Rob Herring, linux-media
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Kukjin Kim,
	Krzysztof Kozlowski, Javier Martinez Canillas, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Matthias Brugger, Laurent Pinchart,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon,
	Michal Simek, Sören Brinkmann, linux-arm-kernel,
	linux-samsung-soc, linux-mediatek, linux-renesas-soc

On 07/18/2017 11:43 PM, Rob Herring wrote:
> 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 <robh@kernel.org>

> ---
>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>   drivers/media/platform/pxa_camera.c            |  2 +-
>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>   include/media/v4l2-clk.h                       |  4 +-
>   19 files changed, 71 insertions(+), 83 deletions(-)

> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c

> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>   		remote = ent->entity;
> 
>   		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);

Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?

>   			v4l2_fwnode_put_link(&link);
>   			ret = -EINVAL;
>   			break;

> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>   		ent = xvip_graph_find_entity(xdev,
>   					     to_of_node(link.remote_node));
>   		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>   			v4l2_fwnode_put_link(&link);
>   			ret = -ENODEV;
>   			break;
>   		}

> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>   	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>   		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);

I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
"[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

--
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  9:41     ` Sylwester Nawrocki
  0 siblings, 0 replies; 38+ messages in thread
From: Sylwester Nawrocki @ 2017-07-19  9:41 UTC (permalink / raw)
  To: Rob Herring, linux-media
  Cc: Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Kukjin Kim,
	Krzysztof Kozlowski, Javier Martinez Canillas, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Matthias Brugger, Laurent Pinchart,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon

On 07/18/2017 11:43 PM, Rob Herring wrote:
> 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 <robh@kernel.org>

> ---
>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>   drivers/media/platform/pxa_camera.c            |  2 +-
>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>   include/media/v4l2-clk.h                       |  4 +-
>   19 files changed, 71 insertions(+), 83 deletions(-)

> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c

> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>   		remote = ent->entity;
> 
>   		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);

Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?

>   			v4l2_fwnode_put_link(&link);
>   			ret = -EINVAL;
>   			break;

> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>   		ent = xvip_graph_find_entity(xdev,
>   					     to_of_node(link.remote_node));
>   		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>   			v4l2_fwnode_put_link(&link);
>   			ret = -ENODEV;
>   			break;
>   		}

> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>   	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>   		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);

I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
"[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19  9:41     ` Sylwester Nawrocki
  0 siblings, 0 replies; 38+ messages in thread
From: Sylwester Nawrocki @ 2017-07-19  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/18/2017 11:43 PM, Rob Herring wrote:
> 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 <robh@kernel.org>

> ---
>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>   drivers/media/platform/pxa_camera.c            |  2 +-
>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>   include/media/v4l2-clk.h                       |  4 +-
>   19 files changed, 71 insertions(+), 83 deletions(-)

> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c

> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>   		remote = ent->entity;
> 
>   		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);

Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?

>   			v4l2_fwnode_put_link(&link);
>   			ret = -EINVAL;
>   			break;

> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>   		ent = xvip_graph_find_entity(xdev,
>   					     to_of_node(link.remote_node));
>   		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>   			v4l2_fwnode_put_link(&link);
>   			ret = -ENODEV;
>   			break;
>   		}

> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>   	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>   		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);

I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
"[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

--
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-18 21:43   ` Rob Herring
  (?)
@ 2017-07-19 10:26     ` Matthias Brugger
  -1 siblings, 0 replies; 38+ messages in thread
From: Matthias Brugger @ 2017-07-19 10:26 UTC (permalink / raw)
  To: Rob Herring, Mauro Carvalho Chehab
  Cc: linux-kernel, devicetree, Kyungmin Park, Andrzej Hajda, Lad,
	Prabhakar, Songjun Wu, Sylwester Nawrocki, Kukjin Kim,
	Krzysztof Kozlowski, Javier Martinez Canillas, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Laurent Pinchart,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon,
	Michal Simek, Sören Brinkmann, linux-media,
	linux-arm-kernel, linux-samsung-soc, linux-mediatek,
	linux-renesas-soc



On 07/18/2017 11:43 PM, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--

For mediatek parts:

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 10:26     ` Matthias Brugger
  0 siblings, 0 replies; 38+ messages in thread
From: Matthias Brugger @ 2017-07-19 10:26 UTC (permalink / raw)
  To: Rob Herring, Mauro Carvalho Chehab
  Cc: linux-kernel, devicetree, Kyungmin Park, Andrzej Hajda, Lad,
	Prabhakar, Songjun Wu, Sylwester Nawrocki, Kukjin Kim,
	Krzysztof Kozlowski, Javier Martinez Canillas, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Laurent Pinchart,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon,
	Michal Simek



On 07/18/2017 11:43 PM, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--

For mediatek parts:

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 10:26     ` Matthias Brugger
  0 siblings, 0 replies; 38+ messages in thread
From: Matthias Brugger @ 2017-07-19 10:26 UTC (permalink / raw)
  To: linux-arm-kernel



On 07/18/2017 11:43 PM, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas S?derlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--

For mediatek parts:

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-18 21:43   ` Rob Herring
  (?)
@ 2017-07-19 11:39     ` Nicolas Ferre
  -1 siblings, 0 replies; 38+ messages in thread
From: Nicolas Ferre @ 2017-07-19 11:39 UTC (permalink / raw)
  To: Rob Herring, Mauro Carvalho Chehab
  Cc: Andrew-CT Chen, Minghsiu Tsai, Songjun Wu, Andrzej Hajda, Lad,
	Prabhakar, Laurent Pinchart, Sylwester Nawrocki,
	linux-samsung-soc, Michal Simek, Krzysztof Kozlowski,
	Javier Martinez Canillas, Kukjin Kim, Sören Brinkmann,
	linux-media, devicetree, Houlong Wei, linux-mediatek,
	Matthias Brugger, linux-arm-kernel, Hyun Kwon, linux-kernel,
	linux-renesas-soc, Kyungmin Park, Niklas Söderlund,
	Guennadi Liakhovetski

On 18/07/2017 at 23:43, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-

Instead of Songjun, here is my:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>


>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 11:39     ` Nicolas Ferre
  0 siblings, 0 replies; 38+ messages in thread
From: Nicolas Ferre @ 2017-07-19 11:39 UTC (permalink / raw)
  To: Rob Herring, Mauro Carvalho Chehab
  Cc: Andrew-CT Chen, Minghsiu Tsai, Songjun Wu, Andrzej Hajda, Lad,
	Prabhakar, Laurent Pinchart, Sylwester Nawrocki,
	linux-samsung-soc, Michal Simek, Krzysztof Kozlowski,
	Javier Martinez Canillas, Kukjin Kim, Sören Brinkmann,
	linux-media, devicetree, Houlong Wei, linux-mediatek,
	Matthias Brugger

On 18/07/2017 at 23:43, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-

Instead of Songjun, here is my:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>


>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 11:39     ` Nicolas Ferre
  0 siblings, 0 replies; 38+ messages in thread
From: Nicolas Ferre @ 2017-07-19 11:39 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/07/2017 at 23:43, Rob Herring wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas S?derlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>  drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>  drivers/media/i2c/s5k5baf.c                    |  7 ++--
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/atmel/atmel-isc.c       |  4 +-

Instead of Songjun, here is my:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>


>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>  drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>  drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>  drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>  drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>  drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>  drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>  drivers/media/platform/omap3isp/isp.c          |  8 ++--
>  drivers/media/platform/pxa_camera.c            |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>  drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>  drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>  drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>  drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>  include/media/v4l2-clk.h                       |  4 +-
>  19 files changed, 71 insertions(+), 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> index f434fb2ee6fc..cdc4f2392ef9 100644
> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
> @@ -1635,8 +1635,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_warn(dev, "no endpoint defined for node: %s\n",
> -						node->full_name);
> +		dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
>  		return 0;
>  	}
> 
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index 962051b9939d..9c22fc963901 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1863,8 +1863,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
> 
>  	node_ep = of_graph_get_next_endpoint(node, NULL);
>  	if (!node_ep) {
> -		dev_err(dev, "no endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "no endpoint defined at node %pOF\n", node);
>  		return -EINVAL;
>  	}
> 
> @@ -1882,8 +1881,8 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
>  	case V4L2_MBUS_PARALLEL:
>  		break;
>  	default:
> -		dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
> -			node->full_name);
> +		dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
> +			node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index 466aba8b0e00..dfcc484cab89 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2490,8 +2490,8 @@ vpfe_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_err(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_err(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
> index d6534252cdcd..b2c66b239cf2 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -1700,8 +1700,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
> 
>  		rem = of_graph_get_remote_port_parent(epn);
>  		if (!rem) {
> -			dev_notice(dev, "Remote device at %s not found\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "Remote device at %pOF not found\n",
> +				   epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index d78580f9e431..0a7aefa22c67 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_async_notifier *notifier,
>  			vpif_obj.config->chan_config->inputs[i].subdev_name =
>  				(char *)to_of_node(subdev->fwnode)->full_name;
>  			vpif_dbg(2, debug,
> -				 "%s: setting input %d subdev_name = %s\n",
> +				 "%s: setting input %d subdev_name = %pOF\n",
>  				 __func__, i,
> -				 to_of_node(subdev->fwnode)->full_name);
> +				 to_of_node(subdev->fwnode));
>  			return 0;
>  		}
>  	}
> @@ -1557,8 +1557,8 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>  			goto done;
>  		}
> -		dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
> -			endpoint->full_name, bus_cfg.bus.parallel.bus_width);
> +		dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
> +			endpoint, bus_cfg.bus.parallel.bus_width);
>  		flags = bus_cfg.bus.parallel.flags;
> 
>  		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
> @@ -1569,13 +1569,13 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> 
>  		rem = of_graph_get_remote_port_parent(endpoint);
>  		if (!rem) {
> -			dev_dbg(&pdev->dev, "Remote device at %s not found\n",
> -				endpoint->full_name);
> +			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
> +				endpoint);
>  			goto done;
>  		}
> 
> -		dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
> -			rem->name, rem->full_name);
> +		dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> +			rem->name, rem);
>  		sdinfo->name = rem->full_name;
> 
>  		pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
> index 340d906db370..5ddb2321e9e4 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is.c
> @@ -174,8 +174,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
> 
>  	sensor->drvdata = fimc_is_sensor_get_drvdata(node);
>  	if (!sensor->drvdata) {
> -		dev_err(&is->pdev->dev, "no driver data found for: %s\n",
> -							 node->full_name);
> +		dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
> +							 node);
>  		return -EINVAL;
>  	}
> 
> @@ -191,8 +191,8 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index,
>  	/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
>  	ret = of_property_read_u32(port, "reg", &tmp);
>  	if (ret < 0) {
> -		dev_err(&is->pdev->dev, "reg property not found at: %s\n",
> -							 port->full_name);
> +		dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
> +							 port);
>  		of_node_put(port);
>  		return ret;
>  	}
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index 7d3ec5cc6608..388a964cbf76 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1493,8 +1493,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
> 
>  	if (!drv_data || fimc->index >= drv_data->num_instances ||
>  						fimc->index < 0) {
> -		dev_err(dev, "Wrong %s node alias\n",
> -					dev->of_node->full_name);
> +		dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
>  		return -EINVAL;
>  	}
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index 7d1cf78846c4..d4656d5175d7 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -412,8 +412,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  	rem = of_graph_get_remote_port_parent(ep);
>  	of_node_put(ep);
>  	if (rem == NULL) {
> -		v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
> -							ep->full_name);
> +		v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
> +							ep);
>  		return 0;
>  	}
> 
> @@ -430,8 +430,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>  		 */
>  		pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
>  	} else {
> -		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
> -			 endpoint.base.port, rem->full_name);
> +		v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
> +			 endpoint.base.port, rem);
>  	}
>  	/*
>  	 * For FIMC-IS handled sensors, that are placed under i2c-isp device
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index 98c89873c2dc..560aadabcb11 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -730,8 +730,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
> 
>  	node = of_graph_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -				pdev->dev.of_node->full_name);
> +		dev_err(&pdev->dev, "No port node at %pOF\n",
> +				pdev->dev.of_node);
>  		return -EINVAL;
>  	}
>  	/* Get port node and validate MIPI-CSI channel id. */
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> index aa8f9fd1f1a2..e728d32d9408 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
> @@ -134,15 +134,13 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
>  	larb_node = of_parse_phandle(node, "mediatek,larb", 0);
>  	if (!larb_node) {
>  		dev_err(dev,
> -			"Missing mediadek,larb phandle in %s node\n",
> -			node->full_name);
> +			"Missing mediadek,larb phandle in %pOF node\n", node);
>  		return -EINVAL;
>  	}
> 
>  	larb_pdev = of_find_device_by_node(larb_node);
>  	if (!larb_pdev) {
> -		dev_warn(dev, "Waiting for larb device %s\n",
> -			 larb_node->full_name);
> +		dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
>  		of_node_put(larb_node);
>  		return -EPROBE_DEFER;
>  	}
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> index 81347558b24a..bbb24fb95b95 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c
> @@ -137,16 +137,16 @@ static int mtk_mdp_probe(struct platform_device *pdev)
>  			continue;
> 
>  		if (!of_device_is_available(node)) {
> -			dev_err(dev, "Skipping disabled component %s\n",
> -				node->full_name);
> +			dev_err(dev, "Skipping disabled component %pOF\n",
> +				node);
>  			continue;
>  		}
> 
>  		comp_type = (enum mtk_mdp_comp_type)of_id->data;
>  		comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
>  		if (comp_id < 0) {
> -			dev_warn(dev, "Skipping unknown component %s\n",
> -				 node->full_name);
> +			dev_warn(dev, "Skipping unknown component %pOF\n",
> +				 node);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index 9df64c189883..afbc5b7942f8 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2020,8 +2020,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
> 
> -	dev_dbg(dev, "parsing endpoint %s, interface %u\n",
> -		to_of_node(fwnode)->full_name, vep.base.port);
> +	dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
> +		to_of_node(fwnode), vep.base.port);
> 
>  	switch (vep.base.port) {
>  	case ISP_OF_PHY_PARALLEL:
> @@ -2078,8 +2078,8 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
>  		break;
> 
>  	default:
> -		dev_warn(dev, "%s: invalid interface %u\n",
> -			 to_of_node(fwnode)->full_name, vep.base.port);
> +		dev_warn(dev, "%pOF: invalid interface %u\n",
> +			 to_of_node(fwnode), vep.base.port);
>  		break;
>  	}
> 
> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> index 399095170b6e..787ae4c3c343 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2328,7 +2328,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
>  		asd->match.fwnode.fwnode = of_fwnode_handle(remote);
>  		of_node_put(remote);
>  	} else {
> -		dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
> +		dev_notice(dev, "no remote for %pOF\n", np);
>  	}
> 
>  out:
> diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> index 77dff047c41c..142de447aaaa 100644
> --- a/drivers/media/platform/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> @@ -222,8 +222,8 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)
> 
>  	subdevs[0] = &vin->digital.asd;
> 
> -	vin_dbg(vin, "Found digital subdevice %s\n",
> -		of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
> +	vin_dbg(vin, "Found digital subdevice %pOF\n",
> +		to_of_node(subdevs[0]->match.fwnode.fwnode));
> 
>  	vin->notifier.num_subdevs = 1;
>  	vin->notifier.subdevs = subdevs;
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 45a0429d75bb..8ba0cb88df64 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1550,8 +1550,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  		v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
>  				  client->adapter->nr, client->addr);
>  	else
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(remote));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> 
>  	icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
>  	if (IS_ERR(icd->clk)) {
> @@ -1590,8 +1589,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> 
>  		ren = of_graph_get_remote_port(epn);
>  		if (!ren) {
> -			dev_notice(dev, "no remote for %s\n",
> -				   of_node_full_name(epn));
> +			dev_notice(dev, "no remote for %pOF\n", epn);
>  			continue;
>  		}
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index ac4704388920..9233ad0b1b6b 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -90,12 +90,12 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -103,9 +103,9 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		 * the link.
>  		 */
>  		if (link.local_port >= local->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u for %s\n",
> +			dev_err(xdev->dev, "invalid port number %u for %pOF\n",
>  				link.local_port,
> -				to_of_node(link.local_node)->full_name);
> +				to_of_node(link.local_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -114,8 +114,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		local_pad = &local->pads[link.local_port];
> 
>  		if (local_pad->flags & MEDIA_PAD_FL_SINK) {
> -			dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -123,8 +123,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> 
>  		/* Skip DMA engines, they will be processed separately. */
>  		if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
> -			dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
> -				to_of_node(link.local_node)->full_name,
> +			dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
> +				to_of_node(link.local_node),
>  				link.local_port);
>  			v4l2_fwnode_put_link(&link);
>  			continue;
> @@ -134,8 +134,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>  		remote = ent->entity;
> 
>  		if (link.remote_port >= remote->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> -				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> +				link.remote_port, link.remote_node);
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -216,12 +215,12 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		of_node_put(ep);
>  		ep = next;
> 
> -		dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
> 
>  		ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
>  		if (ret < 0) {
> -			dev_err(xdev->dev, "failed to parse link for %s\n",
> -				ep->full_name);
> +			dev_err(xdev->dev, "failed to parse link for %pOF\n",
> +				ep);
>  			continue;
>  		}
> 
> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>  		ent = xvip_graph_find_entity(xdev,
>  					     to_of_node(link.remote_node));
>  		if (ent == NULL) {
> -			dev_err(xdev->dev, "no entity found for %s\n",
> -				to_of_node(link.remote_node)->full_name);
> +			dev_err(xdev->dev, "no entity found for %pOF\n",
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -ENODEV;
>  			break;
>  		}
> 
>  		if (link.remote_port >= ent->entity->num_pads) {
> -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>  				link.remote_port,
> -				to_of_node(link.remote_node)->full_name);
> +				to_of_node(link.remote_node));
>  			v4l2_fwnode_put_link(&link);
>  			ret = -EINVAL;
>  			break;
> @@ -337,8 +336,8 @@ static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier,
>  			continue;
> 
>  		if (entity->subdev) {
> -			dev_err(xdev->dev, "duplicate subdev for node %s\n",
> -				entity->node->full_name);
> +			dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
> +				entity->node);
>  			return -EINVAL;
>  		}
> 
> @@ -360,14 +359,14 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  	struct device_node *ep = NULL;
>  	int ret = 0;
> 
> -	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> +	dev_dbg(xdev->dev, "parsing node %pOF\n", node);
> 
>  	while (1) {
>  		ep = of_graph_get_next_endpoint(node, ep);
>  		if (ep == NULL)
>  			break;
> 
> -		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> +		dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
> 
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (remote == NULL) {
> @@ -452,8 +451,7 @@ static int xvip_graph_dma_init_one(struct xvip_composite_device *xdev,
> 
>  	ret = xvip_dma_init(xdev, dma, type, index);
>  	if (ret < 0) {
> -		dev_err(xdev->dev, "%s initialization failed\n",
> -			node->full_name);
> +		dev_err(xdev->dev, "%pOF initialization failed\n", node);
>  		return ret;
>  	}
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index 851f128eba22..0a385d1ff28c 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>  	if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>  		return sd->fwnode == asd->match.fwnode.fwnode;
> 
> -	return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
> -			    of_node_full_name(
> -				    to_of_node(asd->match.fwnode.fwnode)));
> +	return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>  }
> 
>  static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
> diff --git a/drivers/media/v4l2-core/v4l2-clk.c b/drivers/media/v4l2-core/v4l2-clk.c
> index 297e10e69898..90628d7a04de 100644
> --- a/drivers/media/v4l2-core/v4l2-clk.c
> +++ b/drivers/media/v4l2-core/v4l2-clk.c
> @@ -61,8 +61,7 @@ struct v4l2_clk *v4l2_clk_get(struct device *dev, const char *id)
> 
>  	/* if dev_name is not found, try use the OF name to find again  */
>  	if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
> -		v4l2_clk_name_of(clk_name, sizeof(clk_name),
> -				 of_node_full_name(dev->of_node));
> +		v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
>  		clk = v4l2_clk_find(clk_name);
>  	}
> 
> diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h
> index 2b94662d005c..7ec857f805a6 100644
> --- a/include/media/v4l2-clk.h
> +++ b/include/media/v4l2-clk.h
> @@ -70,7 +70,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
>  #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
>  			  "%d-%04x", adap, client)
> 
> -#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
> -			  "of-%s", of_full_name)
> +#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
> +			  "of-%pOF", node)
> 
>  #endif
> --
> 2.11.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-19  9:41     ` Sylwester Nawrocki
  (?)
  (?)
@ 2017-07-19 13:13     ` Laurent Pinchart
  -1 siblings, 0 replies; 38+ messages in thread
From: Laurent Pinchart @ 2017-07-19 13:13 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Rob Herring, linux-media, Mauro Carvalho Chehab, linux-kernel,
	devicetree, Kyungmin Park, Andrzej Hajda, Lad, Prabhakar,
	Songjun Wu, Kukjin Kim, Krzysztof Kozlowski,
	Javier Martinez Canillas, Minghsiu Tsai, Houlong Wei,
	Andrew-CT Chen, Matthias Brugger, Niklas Söderlund,
	Guennadi Liakhovetski, Hyun Kwon, Michal Simek,
	Sören Brinkmann, linux-arm-kernel, linux-samsung-soc,
	linux-mediatek

Hi Sylwester,

On Wednesday 19 Jul 2017 11:41:37 Sylwester Nawrocki wrote:
> On 07/18/2017 11:43 PM, Rob Herring wrote:
> > 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 <robh@kernel.org>
> > 
> > ---
> > 
> >   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
> >   drivers/media/i2c/s5k5baf.c                    |  7 ++--
> >   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
> >   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
> >   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
> >   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
> >   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
> >   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
> >   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
> >   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
> >   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
> >   drivers/media/platform/omap3isp/isp.c          |  8 ++--
> >   drivers/media/platform/pxa_camera.c            |  2 +-
> >   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
> >   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
> >   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 ++++++++++----------
> >   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
> >   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
> >   include/media/v4l2-clk.h                       |  4 +-
> >   19 files changed, 71 insertions(+), 83 deletions(-)
> > 
> > diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c
> > b/drivers/media/platform/xilinx/xilinx-vipp.c index
> > ac4704388920..9233ad0b1b6b 100644
> > --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> > +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> > @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct
> > xvip_composite_device *xdev,
> >   		remote = ent->entity;
> >   		if (link.remote_port >= remote->num_pads) {
> > -			dev_err(xdev->dev, "invalid port number %u on %s\n",
> > -				link.remote_port,
> > -				to_of_node(link.remote_node)->full_name);
> > +			dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> > +				link.remote_port, link.remote_node);
> 
> Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node 
?

Good catch, I had missed that one.

> >   			v4l2_fwnode_put_link(&link);
> >   			ret = -EINVAL;
> >   			break;

[snip]

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-19  9:41     ` Sylwester Nawrocki
  (?)
@ 2017-07-19 16:02       ` Rob Herring
  -1 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-19 16:02 UTC (permalink / raw)
  To: Sylwester Nawrocki, Frank Rowand
  Cc: linux-media, Mauro Carvalho Chehab, linux-kernel, devicetree,
	Kyungmin Park, Andrzej Hajda, Lad, Prabhakar, Songjun Wu,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Niklas Söderlund, Guennadi Liakhovetski,
	Hyun Kwon, Michal Simek, Sören Brinkmann, linux-arm-kernel,
	linux-samsung-soc, linux-mediatek,
	open list:MEDIA DRIVERS FOR RENESAS - FCP

On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 07/18/2017 11:43 PM, Rob Herring wrote:
>> 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 <robh@kernel.org>
>
>> ---
>>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>>   drivers/media/platform/pxa_camera.c            |  2 +-
>>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>>   include/media/v4l2-clk.h                       |  4 +-
>>   19 files changed, 71 insertions(+), 83 deletions(-)
>
>> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
>> index ac4704388920..9233ad0b1b6b 100644
>> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
>> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
>
>> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>>               remote = ent->entity;
>>
>>               if (link.remote_port >= remote->num_pads) {
>> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
>> -                             link.remote_port,
>> -                             to_of_node(link.remote_node)->full_name);
>> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>> +                             link.remote_port, link.remote_node);
>
> Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?

Humm, yes. I thought I fixed that.

>
>>                       v4l2_fwnode_put_link(&link);
>>                       ret = -EINVAL;
>>                       break;
>
>> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>>               ent = xvip_graph_find_entity(xdev,
>>                                            to_of_node(link.remote_node));
>>               if (ent == NULL) {
>> -                     dev_err(xdev->dev, "no entity found for %s\n",
>> -                             to_of_node(link.remote_node)->full_name);
>> +                     dev_err(xdev->dev, "no entity found for %pOF\n",
>> +                             to_of_node(link.remote_node));
>>                       v4l2_fwnode_put_link(&link);
>>                       ret = -ENODEV;
>>                       break;
>>               }
>
>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>> index 851f128eba22..0a385d1ff28c 100644
>> --- a/drivers/media/v4l2-core/v4l2-async.c
>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>       if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>               return sd->fwnode == asd->match.fwnode.fwnode;
>>
>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>> -                         of_node_full_name(
>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>
> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

Maybe I'm missing something, but how does that work exactly? Before
the overlay is applied, the remote endpoint node (and its parent)
can't be resolved. In the commit example, the endpoint in the
media_bridge would also have to be part of the overlay. If you apply
and un-apply the overlay, then the of_node (and fw_node) in the
overlay is once again invalid. IOW, you should be in the same state as
before the overlay was applied. The node is still around because of
paranoia that actually freeing nodes would break things. It seems this
paranoia is real, so i think we need to do something to prevent this
from spreading.

Furthermore, it does not appear that any media driver supports
overlays and we have no general way to apply them in mainline yet
(other than an in kernel API). So really this scenario is not one we
have to support yet.

Rob

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 16:02       ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-19 16:02 UTC (permalink / raw)
  To: Sylwester Nawrocki, Frank Rowand
  Cc: linux-media, Mauro Carvalho Chehab, linux-kernel, devicetree,
	Kyungmin Park, Andrzej Hajda, Lad, Prabhakar, Songjun Wu,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart

On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 07/18/2017 11:43 PM, Rob Herring wrote:
>> 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 <robh@kernel.org>
>
>> ---
>>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>>   drivers/media/platform/pxa_camera.c            |  2 +-
>>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>>   include/media/v4l2-clk.h                       |  4 +-
>>   19 files changed, 71 insertions(+), 83 deletions(-)
>
>> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
>> index ac4704388920..9233ad0b1b6b 100644
>> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
>> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
>
>> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>>               remote = ent->entity;
>>
>>               if (link.remote_port >= remote->num_pads) {
>> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
>> -                             link.remote_port,
>> -                             to_of_node(link.remote_node)->full_name);
>> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>> +                             link.remote_port, link.remote_node);
>
> Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?

Humm, yes. I thought I fixed that.

>
>>                       v4l2_fwnode_put_link(&link);
>>                       ret = -EINVAL;
>>                       break;
>
>> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>>               ent = xvip_graph_find_entity(xdev,
>>                                            to_of_node(link.remote_node));
>>               if (ent == NULL) {
>> -                     dev_err(xdev->dev, "no entity found for %s\n",
>> -                             to_of_node(link.remote_node)->full_name);
>> +                     dev_err(xdev->dev, "no entity found for %pOF\n",
>> +                             to_of_node(link.remote_node));
>>                       v4l2_fwnode_put_link(&link);
>>                       ret = -ENODEV;
>>                       break;
>>               }
>
>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>> index 851f128eba22..0a385d1ff28c 100644
>> --- a/drivers/media/v4l2-core/v4l2-async.c
>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>       if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>               return sd->fwnode == asd->match.fwnode.fwnode;
>>
>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>> -                         of_node_full_name(
>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>
> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

Maybe I'm missing something, but how does that work exactly? Before
the overlay is applied, the remote endpoint node (and its parent)
can't be resolved. In the commit example, the endpoint in the
media_bridge would also have to be part of the overlay. If you apply
and un-apply the overlay, then the of_node (and fw_node) in the
overlay is once again invalid. IOW, you should be in the same state as
before the overlay was applied. The node is still around because of
paranoia that actually freeing nodes would break things. It seems this
paranoia is real, so i think we need to do something to prevent this
from spreading.

Furthermore, it does not appear that any media driver supports
overlays and we have no general way to apply them in mainline yet
(other than an in kernel API). So really this scenario is not one we
have to support yet.

Rob

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 16:02       ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-19 16:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 07/18/2017 11:43 PM, Rob Herring wrote:
>> 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 <robh@kernel.org>
>
>> ---
>>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>>   drivers/media/platform/pxa_camera.c            |  2 +-
>>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>>   include/media/v4l2-clk.h                       |  4 +-
>>   19 files changed, 71 insertions(+), 83 deletions(-)
>
>> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
>> index ac4704388920..9233ad0b1b6b 100644
>> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
>> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
>
>> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>>               remote = ent->entity;
>>
>>               if (link.remote_port >= remote->num_pads) {
>> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
>> -                             link.remote_port,
>> -                             to_of_node(link.remote_node)->full_name);
>> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>> +                             link.remote_port, link.remote_node);
>
> Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?

Humm, yes. I thought I fixed that.

>
>>                       v4l2_fwnode_put_link(&link);
>>                       ret = -EINVAL;
>>                       break;
>
>> @@ -242,17 +241,17 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
>>               ent = xvip_graph_find_entity(xdev,
>>                                            to_of_node(link.remote_node));
>>               if (ent == NULL) {
>> -                     dev_err(xdev->dev, "no entity found for %s\n",
>> -                             to_of_node(link.remote_node)->full_name);
>> +                     dev_err(xdev->dev, "no entity found for %pOF\n",
>> +                             to_of_node(link.remote_node));
>>                       v4l2_fwnode_put_link(&link);
>>                       ret = -ENODEV;
>>                       break;
>>               }
>
>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>> index 851f128eba22..0a385d1ff28c 100644
>> --- a/drivers/media/v4l2-core/v4l2-async.c
>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>       if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>               return sd->fwnode == asd->match.fwnode.fwnode;
>>
>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>> -                         of_node_full_name(
>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>
> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

Maybe I'm missing something, but how does that work exactly? Before
the overlay is applied, the remote endpoint node (and its parent)
can't be resolved. In the commit example, the endpoint in the
media_bridge would also have to be part of the overlay. If you apply
and un-apply the overlay, then the of_node (and fw_node) in the
overlay is once again invalid. IOW, you should be in the same state as
before the overlay was applied. The node is still around because of
paranoia that actually freeing nodes would break things. It seems this
paranoia is real, so i think we need to do something to prevent this
from spreading.

Furthermore, it does not appear that any media driver supports
overlays and we have no general way to apply them in mainline yet
(other than an in kernel API). So really this scenario is not one we
have to support yet.

Rob

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 21:05         ` Frank Rowand
  0 siblings, 0 replies; 38+ messages in thread
From: Frank Rowand @ 2017-07-19 21:05 UTC (permalink / raw)
  To: Rob Herring, Sylwester Nawrocki
  Cc: linux-media, Mauro Carvalho Chehab, linux-kernel, devicetree,
	Kyungmin Park, Andrzej Hajda, Lad, Prabhakar, Songjun Wu,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Niklas Söderlund, Guennadi Liakhovetski,
	Hyun Kwon, Michal Simek, Sören Brinkmann, linux-arm-kernel,
	linux-samsung-soc, linux-mediatek,
	open list:MEDIA DRIVERS FOR RENESAS - FCP

On 07/19/17 09:02, Rob Herring wrote:
> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> On 07/18/2017 11:43 PM, Rob Herring wrote:
>>> 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 <robh@kernel.org>
>>
>>> ---

< snip >

>>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>>> index 851f128eba22..0a385d1ff28c 100644
>>> --- a/drivers/media/v4l2-core/v4l2-async.c
>>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>>       if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>>               return sd->fwnode == asd->match.fwnode.fwnode;
>>>
>>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>>> -                         of_node_full_name(
>>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>>
>> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
>> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

Commit d2180e0cf77dc7a7049671d5d57d seems to have a fundamental
misunderstanding of overlays, if I understand the implications of that
commit.

When an overlay (1) is removed, all uses and references to the nodes and
properties in that overlay are no longer valid.  Any driver that uses any
information from the overlay _must_ stop using any data from the overlay.
Any driver that is bound to a new node in the overlay _must_ unbind.  Any
driver that became bound to a pre-existing node that was modified by the
overlay (became bound after the overlay was applied) _must_ adjust itself
to account for any changes to that node when the overlay is removed.  One
way to do this is to unbind when notified that the overlay is about to
be removed, then to re-bind after the overlay is completely removed.

If an overlay (2) is subsequently applied, a node with the same
full_name as from overlay (1) may exist.  There is no guarantee
that overlay (1) and overlay (2) are the same overlay, even if
that node has the same full_name in both cases.


> Maybe I'm missing something, but how does that work exactly? Before
> the overlay is applied, the remote endpoint node (and its parent)
> can't be resolved. In the commit example, the endpoint in the
> media_bridge would also have to be part of the overlay. If you apply
> and un-apply the overlay, then the of_node (and fw_node) in the
> overlay is once again invalid. IOW, you should be in the same state as
> before the overlay was applied. The node is still around because of
> paranoia that actually freeing nodes would break things. It seems this
> paranoia is real, so i think we need to do something to prevent this
> from spreading.

My understanding is that nodes from an un-applied overlay will be
freed if the expanded device tree that was used to create it has
its reference counts drop to zero.  But I wouldn't count on me
remembering this correctly without actually walking through all
the code.  And as far as I know, there is no example of this
in the mainline tree.


> Furthermore, it does not appear that any media driver supports
> overlays and we have no general way to apply them in mainline yet
> (other than an in kernel API). So really this scenario is not one we
> have to support yet.
> 
> Rob
> 

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 21:05         ` Frank Rowand
  0 siblings, 0 replies; 38+ messages in thread
From: Frank Rowand @ 2017-07-19 21:05 UTC (permalink / raw)
  To: Rob Herring, Sylwester Nawrocki
  Cc: linux-media-u79uwXL29TY76Z2rM5mHXA, Mauro Carvalho Chehab,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Kyungmin Park, Andrzej Hajda,
	Lad, Prabhakar, Songjun Wu, Kukjin Kim, Krzysztof Kozlowski,
	Javier Martinez Canillas, Minghsiu Tsai, Houlong Wei,
	Andrew-CT Chen, Matthias Brugger, Laurent Pinchart

On 07/19/17 09:02, Rob Herring wrote:
> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
> <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
>> On 07/18/2017 11:43 PM, Rob Herring wrote:
>>> 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 <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>>
>>> ---

< snip >

>>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>>> index 851f128eba22..0a385d1ff28c 100644
>>> --- a/drivers/media/v4l2-core/v4l2-async.c
>>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>>       if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>>               return sd->fwnode == asd->match.fwnode.fwnode;
>>>
>>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>>> -                         of_node_full_name(
>>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>>
>> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
>> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

Commit d2180e0cf77dc7a7049671d5d57d seems to have a fundamental
misunderstanding of overlays, if I understand the implications of that
commit.

When an overlay (1) is removed, all uses and references to the nodes and
properties in that overlay are no longer valid.  Any driver that uses any
information from the overlay _must_ stop using any data from the overlay.
Any driver that is bound to a new node in the overlay _must_ unbind.  Any
driver that became bound to a pre-existing node that was modified by the
overlay (became bound after the overlay was applied) _must_ adjust itself
to account for any changes to that node when the overlay is removed.  One
way to do this is to unbind when notified that the overlay is about to
be removed, then to re-bind after the overlay is completely removed.

If an overlay (2) is subsequently applied, a node with the same
full_name as from overlay (1) may exist.  There is no guarantee
that overlay (1) and overlay (2) are the same overlay, even if
that node has the same full_name in both cases.


> Maybe I'm missing something, but how does that work exactly? Before
> the overlay is applied, the remote endpoint node (and its parent)
> can't be resolved. In the commit example, the endpoint in the
> media_bridge would also have to be part of the overlay. If you apply
> and un-apply the overlay, then the of_node (and fw_node) in the
> overlay is once again invalid. IOW, you should be in the same state as
> before the overlay was applied. The node is still around because of
> paranoia that actually freeing nodes would break things. It seems this
> paranoia is real, so i think we need to do something to prevent this
> from spreading.

My understanding is that nodes from an un-applied overlay will be
freed if the expanded device tree that was used to create it has
its reference counts drop to zero.  But I wouldn't count on me
remembering this correctly without actually walking through all
the code.  And as far as I know, there is no example of this
in the mainline tree.


> Furthermore, it does not appear that any media driver supports
> overlays and we have no general way to apply them in mainline yet
> (other than an in kernel API). So really this scenario is not one we
> have to support yet.
> 
> Rob
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-19 21:05         ` Frank Rowand
  0 siblings, 0 replies; 38+ messages in thread
From: Frank Rowand @ 2017-07-19 21:05 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/19/17 09:02, Rob Herring wrote:
> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> On 07/18/2017 11:43 PM, Rob Herring wrote:
>>> 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 <robh@kernel.org>
>>
>>> ---

< snip >

>>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>>> index 851f128eba22..0a385d1ff28c 100644
>>> --- a/drivers/media/v4l2-core/v4l2-async.c
>>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>>       if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>>               return sd->fwnode == asd->match.fwnode.fwnode;
>>>
>>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>>> -                         of_node_full_name(
>>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
>>
>> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
>> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

Commit d2180e0cf77dc7a7049671d5d57d seems to have a fundamental
misunderstanding of overlays, if I understand the implications of that
commit.

When an overlay (1) is removed, all uses and references to the nodes and
properties in that overlay are no longer valid.  Any driver that uses any
information from the overlay _must_ stop using any data from the overlay.
Any driver that is bound to a new node in the overlay _must_ unbind.  Any
driver that became bound to a pre-existing node that was modified by the
overlay (became bound after the overlay was applied) _must_ adjust itself
to account for any changes to that node when the overlay is removed.  One
way to do this is to unbind when notified that the overlay is about to
be removed, then to re-bind after the overlay is completely removed.

If an overlay (2) is subsequently applied, a node with the same
full_name as from overlay (1) may exist.  There is no guarantee
that overlay (1) and overlay (2) are the same overlay, even if
that node has the same full_name in both cases.


> Maybe I'm missing something, but how does that work exactly? Before
> the overlay is applied, the remote endpoint node (and its parent)
> can't be resolved. In the commit example, the endpoint in the
> media_bridge would also have to be part of the overlay. If you apply
> and un-apply the overlay, then the of_node (and fw_node) in the
> overlay is once again invalid. IOW, you should be in the same state as
> before the overlay was applied. The node is still around because of
> paranoia that actually freeing nodes would break things. It seems this
> paranoia is real, so i think we need to do something to prevent this
> from spreading.

My understanding is that nodes from an un-applied overlay will be
freed if the expanded device tree that was used to create it has
its reference counts drop to zero.  But I wouldn't count on me
remembering this correctly without actually walking through all
the code.  And as far as I know, there is no example of this
in the mainline tree.


> Furthermore, it does not appear that any media driver supports
> overlays and we have no general way to apply them in mainline yet
> (other than an in kernel API). So really this scenario is not one we
> have to support yet.
> 
> Rob
> 

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-19 16:02       ` Rob Herring
  (?)
@ 2017-07-20 10:22         ` Sylwester Nawrocki
  -1 siblings, 0 replies; 38+ messages in thread
From: Sylwester Nawrocki @ 2017-07-20 10:22 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand
  Cc: linux-media, Mauro Carvalho Chehab, linux-kernel, devicetree,
	Kyungmin Park, Andrzej Hajda, Lad, Prabhakar, Songjun Wu,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Niklas Söderlund, Guennadi Liakhovetski,
	Hyun Kwon, Michal Simek, Sören Brinkmann, linux-arm-kernel,
	linux-samsung-soc, linux-mediatek,
	open list:MEDIA DRIVERS FOR RENESAS - FCP, Javi Merino

On 07/19/2017 06:02 PM, Rob Herring wrote:
>>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>>> index 851f128eba22..0a385d1ff28c 100644
>>> --- a/drivers/media/v4l2-core/v4l2-async.c
>>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>>        if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>>                return sd->fwnode == asd->match.fwnode.fwnode;
>>>
>>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>>> -                         of_node_full_name(
>>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
 >>
>> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
>> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"
 >
> Maybe I'm missing something, but how does that work exactly? Before
> the overlay is applied, the remote endpoint node (and its parent)
> can't be resolved. In the commit example, the endpoint in the
> media_bridge would also have to be part of the overlay. If you apply
> and un-apply the overlay, then the of_node (and fw_node) in the
> overlay is once again invalid. IOW, you should be in the same state as
> before the overlay was applied. The node is still around because of
> paranoia that actually freeing nodes would break things. It seems this
> paranoia is real, so i think we need to do something to prevent this
> from spreading.
> 
> Furthermore, it does not appear that any media driver supports
> overlays and we have no general way to apply them in mainline yet
> (other than an in kernel API). So really this scenario is not one we
> have to support yet.

Indeed, the motivation of the above mentioned commit was some out of
tree driver. I don't know was the exact use case, assuming that the
endpoint in the bridge node was also part of the overlay the bridge
driver must have not been rescanning device tree after overlay un-apply
and apply. Currently there is no other way to do this than to unbind
and bind. So the bridge driver must have been referencing an already
invalid node as you point out.

I haven't been following DT overlays very closely, as Frank explains
your change seems to be actually an improvement of current code.

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 10:22         ` Sylwester Nawrocki
  0 siblings, 0 replies; 38+ messages in thread
From: Sylwester Nawrocki @ 2017-07-20 10:22 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand
  Cc: linux-media, Mauro Carvalho Chehab, linux-kernel, devicetree,
	Kyungmin Park, Andrzej Hajda, Lad, Prabhakar, Songjun Wu,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart

On 07/19/2017 06:02 PM, Rob Herring wrote:
>>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>>> index 851f128eba22..0a385d1ff28c 100644
>>> --- a/drivers/media/v4l2-core/v4l2-async.c
>>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>>        if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>>                return sd->fwnode == asd->match.fwnode.fwnode;
>>>
>>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>>> -                         of_node_full_name(
>>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
 >>
>> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
>> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"
 >
> Maybe I'm missing something, but how does that work exactly? Before
> the overlay is applied, the remote endpoint node (and its parent)
> can't be resolved. In the commit example, the endpoint in the
> media_bridge would also have to be part of the overlay. If you apply
> and un-apply the overlay, then the of_node (and fw_node) in the
> overlay is once again invalid. IOW, you should be in the same state as
> before the overlay was applied. The node is still around because of
> paranoia that actually freeing nodes would break things. It seems this
> paranoia is real, so i think we need to do something to prevent this
> from spreading.
> 
> Furthermore, it does not appear that any media driver supports
> overlays and we have no general way to apply them in mainline yet
> (other than an in kernel API). So really this scenario is not one we
> have to support yet.

Indeed, the motivation of the above mentioned commit was some out of
tree driver. I don't know was the exact use case, assuming that the
endpoint in the bridge node was also part of the overlay the bridge
driver must have not been rescanning device tree after overlay un-apply
and apply. Currently there is no other way to do this than to unbind
and bind. So the bridge driver must have been referencing an already
invalid node as you point out.

I haven't been following DT overlays very closely, as Frank explains
your change seems to be actually an improvement of current code.

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 10:22         ` Sylwester Nawrocki
  0 siblings, 0 replies; 38+ messages in thread
From: Sylwester Nawrocki @ 2017-07-20 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/19/2017 06:02 PM, Rob Herring wrote:
>>> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
>>> index 851f128eba22..0a385d1ff28c 100644
>>> --- a/drivers/media/v4l2-core/v4l2-async.c
>>> +++ b/drivers/media/v4l2-core/v4l2-async.c
>>> @@ -47,9 +47,7 @@ static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
>>>        if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode))
>>>                return sd->fwnode == asd->match.fwnode.fwnode;
>>>
>>> -     return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)),
>>> -                         of_node_full_name(
>>> -                                 to_of_node(asd->match.fwnode.fwnode)));
>>> +     return to_of_node(sd->fwnode) == to_of_node(asd->match.fwnode.fwnode);
 >>
>> I'm afraid this will not work, please see commit d2180e0cf77dc7a7049671d5d57d
>> "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"
 >
> Maybe I'm missing something, but how does that work exactly? Before
> the overlay is applied, the remote endpoint node (and its parent)
> can't be resolved. In the commit example, the endpoint in the
> media_bridge would also have to be part of the overlay. If you apply
> and un-apply the overlay, then the of_node (and fw_node) in the
> overlay is once again invalid. IOW, you should be in the same state as
> before the overlay was applied. The node is still around because of
> paranoia that actually freeing nodes would break things. It seems this
> paranoia is real, so i think we need to do something to prevent this
> from spreading.
> 
> Furthermore, it does not appear that any media driver supports
> overlays and we have no general way to apply them in mainline yet
> (other than an in kernel API). So really this scenario is not one we
> have to support yet.

Indeed, the motivation of the above mentioned commit was some out of
tree driver. I don't know was the exact use case, assuming that the
endpoint in the bridge node was also part of the overlay the bridge
driver must have not been rescanning device tree after overlay un-apply
and apply. Currently there is no other way to do this than to unbind
and bind. So the bridge driver must have been referencing an already
invalid node as you point out.

I haven't been following DT overlays very closely, as Frank explains
your change seems to be actually an improvement of current code.

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-19 16:02       ` Rob Herring
  (?)
@ 2017-07-20 11:15         ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 38+ messages in thread
From: Mauro Carvalho Chehab @ 2017-07-20 11:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sylwester Nawrocki, Frank Rowand, linux-media,
	Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Kukjin Kim,
	Krzysztof Kozlowski, Minghsiu Tsai, Houlong Wei, Andrew-CT Chen,
	Matthias Brugger, Laurent Pinchart, Niklas Söderlund,
	Guennadi Liakhovetski, Hyun Kwon, Michal Simek,
	Sören Brinkmann, linux-arm-kernel, linux-samsung-soc,
	linux-mediatek, open list:MEDIA DRIVERS FOR RENESAS - FCP

Em Wed, 19 Jul 2017 11:02:01 -0500
Rob Herring <robh@kernel.org> escreveu:

> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
> > On 07/18/2017 11:43 PM, Rob Herring wrote:  
> >> 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 <robh@kernel.org>  
> >  
> >> ---
> >>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
> >>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
> >>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
> >>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
> >>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
> >>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
> >>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
> >>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
> >>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
> >>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
> >>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
> >>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
> >>   drivers/media/platform/pxa_camera.c            |  2 +-
> >>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
> >>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
> >>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
> >>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
> >>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
> >>   include/media/v4l2-clk.h                       |  4 +-
> >>   19 files changed, 71 insertions(+), 83 deletions(-)  
> >  
> >> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> >> index ac4704388920..9233ad0b1b6b 100644
> >> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> >> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c  
> >  
> >> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> >>               remote = ent->entity;
> >>
> >>               if (link.remote_port >= remote->num_pads) {
> >> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
> >> -                             link.remote_port,
> >> -                             to_of_node(link.remote_node)->full_name);
> >> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> >> +                             link.remote_port, link.remote_node);  
> >
> > Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?  
> 
> Humm, yes. I thought I fixed that.

After such fix, I'm OK with this patch.

Are you planning to apply it on your tree, or via the media one?

I guess it is probably better to apply via media, in order to avoid
conflicts with other changes.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 11:15         ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 38+ messages in thread
From: Mauro Carvalho Chehab @ 2017-07-20 11:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sylwester Nawrocki, Frank Rowand, linux-media,
	Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Kukjin Kim,
	Krzysztof Kozlowski, Minghsiu Tsai, Houlong Wei, Andrew-CT Chen,
	Matthias Brugger, Laurent Pinchart

Em Wed, 19 Jul 2017 11:02:01 -0500
Rob Herring <robh@kernel.org> escreveu:

> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
> > On 07/18/2017 11:43 PM, Rob Herring wrote:  
> >> 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 <robh@kernel.org>  
> >  
> >> ---
> >>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
> >>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
> >>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
> >>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
> >>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
> >>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
> >>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
> >>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
> >>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
> >>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
> >>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
> >>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
> >>   drivers/media/platform/pxa_camera.c            |  2 +-
> >>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
> >>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
> >>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
> >>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
> >>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
> >>   include/media/v4l2-clk.h                       |  4 +-
> >>   19 files changed, 71 insertions(+), 83 deletions(-)  
> >  
> >> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> >> index ac4704388920..9233ad0b1b6b 100644
> >> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> >> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c  
> >  
> >> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> >>               remote = ent->entity;
> >>
> >>               if (link.remote_port >= remote->num_pads) {
> >> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
> >> -                             link.remote_port,
> >> -                             to_of_node(link.remote_node)->full_name);
> >> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> >> +                             link.remote_port, link.remote_node);  
> >
> > Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?  
> 
> Humm, yes. I thought I fixed that.

After such fix, I'm OK with this patch.

Are you planning to apply it on your tree, or via the media one?

I guess it is probably better to apply via media, in order to avoid
conflicts with other changes.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 11:15         ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 38+ messages in thread
From: Mauro Carvalho Chehab @ 2017-07-20 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

Em Wed, 19 Jul 2017 11:02:01 -0500
Rob Herring <robh@kernel.org> escreveu:

> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
> > On 07/18/2017 11:43 PM, Rob Herring wrote:  
> >> 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 <robh@kernel.org>  
> >  
> >> ---
> >>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
> >>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
> >>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
> >>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
> >>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
> >>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
> >>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
> >>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
> >>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
> >>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
> >>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
> >>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
> >>   drivers/media/platform/pxa_camera.c            |  2 +-
> >>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
> >>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
> >>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
> >>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
> >>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
> >>   include/media/v4l2-clk.h                       |  4 +-
> >>   19 files changed, 71 insertions(+), 83 deletions(-)  
> >  
> >> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> >> index ac4704388920..9233ad0b1b6b 100644
> >> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> >> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c  
> >  
> >> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
> >>               remote = ent->entity;
> >>
> >>               if (link.remote_port >= remote->num_pads) {
> >> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
> >> -                             link.remote_port,
> >> -                             to_of_node(link.remote_node)->full_name);
> >> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
> >> +                             link.remote_port, link.remote_node);  
> >
> > Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?  
> 
> Humm, yes. I thought I fixed that.

After such fix, I'm OK with this patch.

Are you planning to apply it on your tree, or via the media one?

I guess it is probably better to apply via media, in order to avoid
conflicts with other changes.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 11:21     ` Lad, Prabhakar
  0 siblings, 0 replies; 38+ messages in thread
From: Lad, Prabhakar @ 2017-07-20 11:21 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, LKML, devicetree, Kyungmin Park,
	Andrzej Hajda, Songjun Wu, Sylwester Nawrocki, Kukjin Kim,
	Krzysztof Kozlowski, Javier Martinez Canillas, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Matthias Brugger, Laurent Pinchart,
	Niklas Söderlund, Guennadi Liakhovetski, Hyun Kwon,
	Michal Simek, Sören Brinkmann, linux-media, LAK,
	linux-samsung-soc, linux-mediatek, linux-renesas-soc

On Tue, Jul 18, 2017 at 10:43 PM, Rob Herring <robh@kernel.org> wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----

For above:

Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 11:21     ` Lad, Prabhakar
  0 siblings, 0 replies; 38+ messages in thread
From: Lad, Prabhakar @ 2017-07-20 11:21 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, LKML, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Kyungmin Park, Andrzej Hajda, Songjun Wu, Sylwester Nawrocki,
	Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Matthias Brugger,
	Laurent Pinchart, Niklas Söderlund, Guennadi Liakhovetski

On Tue, Jul 18, 2017 at 10:43 PM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> 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 <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Cc: Andrzej Hajda <a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Cc: Mauro Carvalho Chehab <mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Songjun Wu <songjun.wu-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>
> Cc: Sylwester Nawrocki <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Cc: Kukjin Kim <kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Krzysztof Kozlowski <krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
> Cc: Minghsiu Tsai <minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> Cc: Houlong Wei <houlong.wei-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> Cc: Andrew-CT Chen <andrew-ct.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
> Cc: "Niklas Söderlund" <niklas.soderlund-1zkq55x86MTxsAP9Fp7wbw@public.gmane.org>
> Cc: Guennadi Liakhovetski <g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
> Cc: Hyun Kwon <hyun.kwon-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
> Cc: Michal Simek <michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
> Cc: "Sören Brinkmann" <soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
> Cc: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----

For above:

Acked-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Cheers,
--Prabhakar Lad
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 11:21     ` Lad, Prabhakar
  0 siblings, 0 replies; 38+ messages in thread
From: Lad, Prabhakar @ 2017-07-20 11:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 18, 2017 at 10:43 PM, Rob Herring <robh@kernel.org> wrote:
> 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 <robh@kernel.org>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Songjun Wu <songjun.wu@microchip.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: "Niklas S?derlund" <niklas.soderlund@ragnatech.se>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-media at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-renesas-soc at vger.kernel.org
> ---
>  drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>  drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----

For above:

Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
  2017-07-20 11:15         ` Mauro Carvalho Chehab
  (?)
@ 2017-07-20 14:06           ` Rob Herring
  -1 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-20 14:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Sylwester Nawrocki, Frank Rowand, linux-media,
	Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Kukjin Kim,
	Krzysztof Kozlowski, Minghsiu Tsai, Houlong Wei, Andrew-CT Chen,
	Matthias Brugger, Laurent Pinchart, Niklas Söderlund,
	Guennadi Liakhovetski, Hyun Kwon, Michal Simek,
	Sören Brinkmann, linux-arm-kernel, linux-samsung-soc,
	linux-mediatek, open list:MEDIA DRIVERS FOR RENESAS - FCP

On Thu, Jul 20, 2017 at 6:15 AM, Mauro Carvalho Chehab
<mchehab@s-opensource.com> wrote:
> Em Wed, 19 Jul 2017 11:02:01 -0500
> Rob Herring <robh@kernel.org> escreveu:
>
>> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
>> <s.nawrocki@samsung.com> wrote:
>> > On 07/18/2017 11:43 PM, Rob Herring wrote:
>> >> 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 <robh@kernel.org>
>> >
>> >> ---
>> >>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>> >>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>> >>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>> >>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>> >>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>> >>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>> >>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>> >>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>> >>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>> >>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>> >>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>> >>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>> >>   drivers/media/platform/pxa_camera.c            |  2 +-
>> >>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>> >>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>> >>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>> >>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>> >>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>> >>   include/media/v4l2-clk.h                       |  4 +-
>> >>   19 files changed, 71 insertions(+), 83 deletions(-)
>> >
>> >> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
>> >> index ac4704388920..9233ad0b1b6b 100644
>> >> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
>> >> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
>> >
>> >> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>> >>               remote = ent->entity;
>> >>
>> >>               if (link.remote_port >= remote->num_pads) {
>> >> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
>> >> -                             link.remote_port,
>> >> -                             to_of_node(link.remote_node)->full_name);
>> >> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>> >> +                             link.remote_port, link.remote_node);
>> >
>> > Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?
>>
>> Humm, yes. I thought I fixed that.
>
> After such fix, I'm OK with this patch.

I'll send a new version.

I think I'll send a revert of the referenced commit. It won't apply
cleanly, but at least it will capture the change in behavior and why
it was wrong.

> Are you planning to apply it on your tree, or via the media one?
>
> I guess it is probably better to apply via media, in order to avoid
> conflicts with other changes.

Yes, you can take it.

Rob

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 14:06           ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-20 14:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Sylwester Nawrocki, Frank Rowand, linux-media,
	Mauro Carvalho Chehab, linux-kernel, devicetree, Kyungmin Park,
	Andrzej Hajda, Lad, Prabhakar, Songjun Wu, Kukjin Kim,
	Krzysztof Kozlowski, Minghsiu Tsai, Houlong Wei, Andrew-CT Chen,
	Matthias Brugger, Laurent Pinchart

On Thu, Jul 20, 2017 at 6:15 AM, Mauro Carvalho Chehab
<mchehab@s-opensource.com> wrote:
> Em Wed, 19 Jul 2017 11:02:01 -0500
> Rob Herring <robh@kernel.org> escreveu:
>
>> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
>> <s.nawrocki@samsung.com> wrote:
>> > On 07/18/2017 11:43 PM, Rob Herring wrote:
>> >> 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 <robh@kernel.org>
>> >
>> >> ---
>> >>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>> >>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>> >>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>> >>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>> >>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>> >>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>> >>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>> >>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>> >>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>> >>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>> >>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>> >>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>> >>   drivers/media/platform/pxa_camera.c            |  2 +-
>> >>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>> >>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>> >>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>> >>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>> >>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>> >>   include/media/v4l2-clk.h                       |  4 +-
>> >>   19 files changed, 71 insertions(+), 83 deletions(-)
>> >
>> >> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
>> >> index ac4704388920..9233ad0b1b6b 100644
>> >> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
>> >> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
>> >
>> >> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>> >>               remote = ent->entity;
>> >>
>> >>               if (link.remote_port >= remote->num_pads) {
>> >> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
>> >> -                             link.remote_port,
>> >> -                             to_of_node(link.remote_node)->full_name);
>> >> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>> >> +                             link.remote_port, link.remote_node);
>> >
>> > Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?
>>
>> Humm, yes. I thought I fixed that.
>
> After such fix, I'm OK with this patch.

I'll send a new version.

I think I'll send a revert of the referenced commit. It won't apply
cleanly, but at least it will capture the change in behavior and why
it was wrong.

> Are you planning to apply it on your tree, or via the media one?
>
> I guess it is probably better to apply via media, in order to avoid
> conflicts with other changes.

Yes, you can take it.

Rob

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] media: Convert to using %pOF instead of full_name
@ 2017-07-20 14:06           ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2017-07-20 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jul 20, 2017 at 6:15 AM, Mauro Carvalho Chehab
<mchehab@s-opensource.com> wrote:
> Em Wed, 19 Jul 2017 11:02:01 -0500
> Rob Herring <robh@kernel.org> escreveu:
>
>> On Wed, Jul 19, 2017 at 4:41 AM, Sylwester Nawrocki
>> <s.nawrocki@samsung.com> wrote:
>> > On 07/18/2017 11:43 PM, Rob Herring wrote:
>> >> 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 <robh@kernel.org>
>> >
>> >> ---
>> >>   drivers/media/i2c/s5c73m3/s5c73m3-core.c       |  3 +-
>> >>   drivers/media/i2c/s5k5baf.c                    |  7 ++--
>> >>   drivers/media/platform/am437x/am437x-vpfe.c    |  4 +-
>> >>   drivers/media/platform/atmel/atmel-isc.c       |  4 +-
>> >>   drivers/media/platform/davinci/vpif_capture.c  | 16 ++++----
>> >>   drivers/media/platform/exynos4-is/fimc-is.c    |  8 ++--
>> >>   drivers/media/platform/exynos4-is/fimc-lite.c  |  3 +-
>> >>   drivers/media/platform/exynos4-is/media-dev.c  |  8 ++--
>> >>   drivers/media/platform/exynos4-is/mipi-csis.c  |  4 +-
>> >>   drivers/media/platform/mtk-mdp/mtk_mdp_comp.c  |  6 +--
>> >>   drivers/media/platform/mtk-mdp/mtk_mdp_core.c  |  8 ++--
>> >>   drivers/media/platform/omap3isp/isp.c          |  8 ++--
>> >>   drivers/media/platform/pxa_camera.c            |  2 +-
>> >>   drivers/media/platform/rcar-vin/rcar-core.c    |  4 +-
>> >>   drivers/media/platform/soc_camera/soc_camera.c |  6 +--
>> >>   drivers/media/platform/xilinx/xilinx-vipp.c    | 52 +++++++++++++-------------
>> >>   drivers/media/v4l2-core/v4l2-async.c           |  4 +-
>> >>   drivers/media/v4l2-core/v4l2-clk.c             |  3 +-
>> >>   include/media/v4l2-clk.h                       |  4 +-
>> >>   19 files changed, 71 insertions(+), 83 deletions(-)
>> >
>> >> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
>> >> index ac4704388920..9233ad0b1b6b 100644
>> >> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
>> >> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
>> >
>> >> @@ -144,9 +144,8 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
>> >>               remote = ent->entity;
>> >>
>> >>               if (link.remote_port >= remote->num_pads) {
>> >> -                     dev_err(xdev->dev, "invalid port number %u on %s\n",
>> >> -                             link.remote_port,
>> >> -                             to_of_node(link.remote_node)->full_name);
>> >> +                     dev_err(xdev->dev, "invalid port number %u on %pOF\n",
>> >> +                             link.remote_port, link.remote_node);
>> >
>> > Shouldn't there be to_of_node(link.remote_node) instead of link.remote_node ?
>>
>> Humm, yes. I thought I fixed that.
>
> After such fix, I'm OK with this patch.

I'll send a new version.

I think I'll send a revert of the referenced commit. It won't apply
cleanly, but at least it will capture the change in behavior and why
it was wrong.

> Are you planning to apply it on your tree, or via the media one?
>
> I guess it is probably better to apply via media, in order to avoid
> conflicts with other changes.

Yes, you can take it.

Rob

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2017-07-20 14:06 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170718215328epcas2p2e5e1d7df96fcd894e70a961df864abdd@epcas2p2.samsung.com>
2017-07-18 21:43 ` [PATCH] media: Convert to using %pOF instead of full_name Rob Herring
2017-07-18 21:43   ` Rob Herring
2017-07-18 21:43   ` Rob Herring
2017-07-19  8:28   ` Niklas Söderlund
2017-07-19  8:28     ` Niklas Söderlund
2017-07-19  8:28     ` Niklas Söderlund
2017-07-19  8:28     ` Niklas Söderlund
2017-07-19  8:55   ` Laurent Pinchart
2017-07-19  8:55     ` Laurent Pinchart
2017-07-19  8:55     ` Laurent Pinchart
2017-07-19  9:41   ` Sylwester Nawrocki
2017-07-19  9:41     ` Sylwester Nawrocki
2017-07-19  9:41     ` Sylwester Nawrocki
2017-07-19 13:13     ` Laurent Pinchart
2017-07-19 16:02     ` Rob Herring
2017-07-19 16:02       ` Rob Herring
2017-07-19 16:02       ` Rob Herring
2017-07-19 21:05       ` Frank Rowand
2017-07-19 21:05         ` Frank Rowand
2017-07-19 21:05         ` Frank Rowand
2017-07-20 10:22       ` Sylwester Nawrocki
2017-07-20 10:22         ` Sylwester Nawrocki
2017-07-20 10:22         ` Sylwester Nawrocki
2017-07-20 11:15       ` Mauro Carvalho Chehab
2017-07-20 11:15         ` Mauro Carvalho Chehab
2017-07-20 11:15         ` Mauro Carvalho Chehab
2017-07-20 14:06         ` Rob Herring
2017-07-20 14:06           ` Rob Herring
2017-07-20 14:06           ` Rob Herring
2017-07-19 10:26   ` Matthias Brugger
2017-07-19 10:26     ` Matthias Brugger
2017-07-19 10:26     ` Matthias Brugger
2017-07-19 11:39   ` Nicolas Ferre
2017-07-19 11:39     ` Nicolas Ferre
2017-07-19 11:39     ` Nicolas Ferre
2017-07-20 11:21   ` Lad, Prabhakar
2017-07-20 11:21     ` Lad, Prabhakar
2017-07-20 11:21     ` Lad, Prabhakar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.