* [PATCH] media: Convert to using %pOFn instead of device_node.name
[not found] <20180828015252.28511-1-robh@kernel.org>
@ 2018-08-28 1:52 ` Rob Herring
2018-08-28 10:06 ` Laurent Pinchart
2018-08-28 1:52 ` [PATCH] staging: " Rob Herring
1 sibling, 1 reply; 14+ messages in thread
From: Rob Herring @ 2018-08-28 1:52 UTC (permalink / raw)
To: linux-kernel
Cc: Mauro Carvalho Chehab, Lad, Prabhakar, Benoit Parrot,
Philipp Zabel, Hyun Kwon, Laurent Pinchart, Michal Simek,
linux-media
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Benoit Parrot <bparrot@ti.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/media/i2c/tvp5150.c | 8 ++++----
drivers/media/platform/davinci/vpif_capture.c | 3 +--
drivers/media/platform/ti-vpe/cal.c | 8 ++++----
drivers/media/platform/video-mux.c | 2 +-
drivers/media/platform/xilinx/xilinx-dma.c | 8 ++++----
5 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 76e6bed5a1da..f337e523821b 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -1403,8 +1403,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np)
ret = of_property_read_u32(child, "input", &input_type);
if (ret) {
dev_err(decoder->sd.dev,
- "missing type property in node %s\n",
- child->name);
+ "missing type property in node %pOFn\n",
+ child);
goto err_connector;
}
@@ -1439,8 +1439,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np)
ret = of_property_read_string(child, "label", &name);
if (ret < 0) {
dev_err(decoder->sd.dev,
- "missing label property in node %s\n",
- child->name);
+ "missing label property in node %pOFn\n",
+ child);
goto err_connector;
}
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index a96f53ce8088..35fc69591d54 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -1583,8 +1583,7 @@ vpif_capture_get_pdata(struct platform_device *pdev)
goto done;
}
- dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
- rem->name, rem);
+ dev_dbg(&pdev->dev, "Remote device %pOF found\n", rem);
sdinfo->name = rem->full_name;
pdata->asd[i] = devm_kzalloc(&pdev->dev,
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index d1febe5baa6d..77d755020e78 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1712,8 +1712,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
v4l2_fwnode_endpoint_parse(of_fwnode_handle(remote_ep), endpoint);
if (endpoint->bus_type != V4L2_MBUS_CSI2) {
- ctx_err(ctx, "Port:%d sub-device %s is not a CSI2 device\n",
- inst, sensor_node->name);
+ ctx_err(ctx, "Port:%d sub-device %pOFn is not a CSI2 device\n",
+ inst, sensor_node);
goto cleanup_exit;
}
@@ -1732,8 +1732,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
endpoint->bus.mipi_csi2.data_lanes[lane]);
ctx_dbg(3, ctx, "\t>\n");
- ctx_dbg(1, ctx, "Port: %d found sub-device %s\n",
- inst, sensor_node->name);
+ ctx_dbg(1, ctx, "Port: %d found sub-device %pOFn\n",
+ inst, sensor_node);
ctx->asd_list[0] = asd;
ctx->notifier.subdevs = ctx->asd_list;
diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c
index c01e1592ad0a..61a9bf716a05 100644
--- a/drivers/media/platform/video-mux.c
+++ b/drivers/media/platform/video-mux.c
@@ -333,7 +333,7 @@ static int video_mux_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, vmux);
v4l2_subdev_init(&vmux->subdev, &video_mux_subdev_ops);
- snprintf(vmux->subdev.name, sizeof(vmux->subdev.name), "%s", np->name);
+ snprintf(vmux->subdev.name, sizeof(vmux->subdev.name), "%pOFn", np);
vmux->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
vmux->subdev.dev = dev;
diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
index d041f94be832..3c8fcf951c63 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -506,8 +506,8 @@ xvip_dma_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
strlcpy(cap->driver, "xilinx-vipp", sizeof(cap->driver));
strlcpy(cap->card, dma->video.name, sizeof(cap->card));
- snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s:%u",
- dma->xdev->dev->of_node->name, dma->port);
+ snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%pOFn:%u",
+ dma->xdev->dev->of_node, dma->port);
return 0;
}
@@ -693,8 +693,8 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
dma->video.fops = &xvip_dma_fops;
dma->video.v4l2_dev = &xdev->v4l2_dev;
dma->video.queue = &dma->queue;
- snprintf(dma->video.name, sizeof(dma->video.name), "%s %s %u",
- xdev->dev->of_node->name,
+ snprintf(dma->video.name, sizeof(dma->video.name), "%pOFn %s %u",
+ xdev->dev->of_node,
type == V4L2_BUF_TYPE_VIDEO_CAPTURE ? "output" : "input",
port);
dma->video.vfl_type = VFL_TYPE_GRABBER;
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] staging: Convert to using %pOFn instead of device_node.name
[not found] <20180828015252.28511-1-robh@kernel.org>
2018-08-28 1:52 ` [PATCH] media: Convert to using %pOFn instead of device_node.name Rob Herring
@ 2018-08-28 1:52 ` Rob Herring
2018-08-28 6:34 ` Ian Arkver
2018-08-28 15:44 ` [PATCH v2] " Rob Herring
1 sibling, 2 replies; 14+ messages in thread
From: Rob Herring @ 2018-08-28 1:52 UTC (permalink / raw)
To: linux-kernel
Cc: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman, linux-media, devel
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.
Cc: Steve Longerbeam <slongerbeam@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/staging/media/imx/imx-media-dev.c | 11 ++++++-----
drivers/staging/media/imx/imx-media-of.c | 4 ++--
drivers/staging/mt7621-eth/mdio.c | 4 ++--
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
index b0be80f05767..818846f8c291 100644
--- a/drivers/staging/media/imx/imx-media-dev.c
+++ b/drivers/staging/media/imx/imx-media-dev.c
@@ -89,8 +89,8 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
/* return -EEXIST if this asd already added */
if (find_async_subdev(imxmd, fwnode, devname)) {
- dev_dbg(imxmd->md.dev, "%s: already added %s\n",
- __func__, np ? np->name : devname);
+ dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
+ __func__, np ? np : devname);
ret = -EEXIST;
goto out;
}
@@ -105,19 +105,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
if (fwnode) {
asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
asd->match.fwnode = fwnode;
+ dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n",
+ __func__, np);
} else {
asd->match_type = V4L2_ASYNC_MATCH_DEVNAME;
asd->match.device_name = devname;
imxasd->pdev = pdev;
+ dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n",
+ __func__, devname);
}
list_add_tail(&imxasd->list, &imxmd->asd_list);
imxmd->subdev_notifier.num_subdevs++;
- dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n",
- __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME");
-
out:
mutex_unlock(&imxmd->mutex);
return ret;
diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c
index acde372c6795..cb74df356576 100644
--- a/drivers/staging/media/imx/imx-media-of.c
+++ b/drivers/staging/media/imx/imx-media-of.c
@@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,
int i, num_ports, ret;
if (!of_device_is_available(sd_np)) {
- dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__,
- sd_np->name);
+ dev_dbg(imxmd->md.dev, "%pOFn: %s not enabled\n", __func__,
+ sd_np);
/* unavailable is not an error */
return 0;
}
diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
index 7ad0c4141205..9ffa8f771235 100644
--- a/drivers/staging/mt7621-eth/mdio.c
+++ b/drivers/staging/mt7621-eth/mdio.c
@@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
_port = of_get_property(phy_node, "reg", NULL);
if (!_port || (be32_to_cpu(*_port) >= 0x20)) {
- pr_err("%s: invalid port id\n", phy_node->name);
+ pr_err("%pOFn: invalid port id\n", phy_node);
return -EINVAL;
}
port = be32_to_cpu(*_port);
@@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth)
eth->mii_bus->priv = eth;
eth->mii_bus->parent = eth->dev;
- snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
+ snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
err = of_mdiobus_register(eth->mii_bus, mii_np);
if (err)
goto err_free_bus;
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] staging: Convert to using %pOFn instead of device_node.name
2018-08-28 1:52 ` [PATCH] staging: " Rob Herring
@ 2018-08-28 6:34 ` Ian Arkver
2018-08-28 15:44 ` [PATCH v2] " Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Ian Arkver @ 2018-08-28 6:34 UTC (permalink / raw)
To: Rob Herring, linux-kernel
Cc: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman, linux-media, devel
Hi,
On 28/08/2018 02:52, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Steve Longerbeam <slongerbeam@gmail.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-media@vger.kernel.org
> Cc: devel@driverdev.osuosl.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/staging/media/imx/imx-media-dev.c | 11 ++++++-----
> drivers/staging/media/imx/imx-media-of.c | 4 ++--
> drivers/staging/mt7621-eth/mdio.c | 4 ++--
> 3 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
> index b0be80f05767..818846f8c291 100644
> --- a/drivers/staging/media/imx/imx-media-dev.c
> +++ b/drivers/staging/media/imx/imx-media-dev.c
> @@ -89,8 +89,8 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
>
> /* return -EEXIST if this asd already added */
> if (find_async_subdev(imxmd, fwnode, devname)) {
> - dev_dbg(imxmd->md.dev, "%s: already added %s\n",
> - __func__, np ? np->name : devname);
> + dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
> + __func__, np ? np : devname);
This won't work for the np==NULL case I think since devname is just a
string.
Regards,
Ian
> ret = -EEXIST;
> goto out;
> }
> @@ -105,19 +105,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
> if (fwnode) {
> asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
> asd->match.fwnode = fwnode;
> + dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n",
> + __func__, np);
> } else {
> asd->match_type = V4L2_ASYNC_MATCH_DEVNAME;
> asd->match.device_name = devname;
> imxasd->pdev = pdev;
> + dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n",
> + __func__, devname);
> }
>
> list_add_tail(&imxasd->list, &imxmd->asd_list);
>
> imxmd->subdev_notifier.num_subdevs++;
>
> - dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n",
> - __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME");
> -
> out:
> mutex_unlock(&imxmd->mutex);
> return ret;
> diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c
> index acde372c6795..cb74df356576 100644
> --- a/drivers/staging/media/imx/imx-media-of.c
> +++ b/drivers/staging/media/imx/imx-media-of.c
> @@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,
> int i, num_ports, ret;
>
> if (!of_device_is_available(sd_np)) {
> - dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__,
> - sd_np->name);
> + dev_dbg(imxmd->md.dev, "%pOFn: %s not enabled\n", __func__,
> + sd_np);
> /* unavailable is not an error */
> return 0;
> }
> diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
> index 7ad0c4141205..9ffa8f771235 100644
> --- a/drivers/staging/mt7621-eth/mdio.c
> +++ b/drivers/staging/mt7621-eth/mdio.c
> @@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
> _port = of_get_property(phy_node, "reg", NULL);
>
> if (!_port || (be32_to_cpu(*_port) >= 0x20)) {
> - pr_err("%s: invalid port id\n", phy_node->name);
> + pr_err("%pOFn: invalid port id\n", phy_node);
> return -EINVAL;
> }
> port = be32_to_cpu(*_port);
> @@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth)
> eth->mii_bus->priv = eth;
> eth->mii_bus->parent = eth->dev;
>
> - snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
> + snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
> err = of_mdiobus_register(eth->mii_bus, mii_np);
> if (err)
> goto err_free_bus;
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] media: Convert to using %pOFn instead of device_node.name
2018-08-28 1:52 ` [PATCH] media: Convert to using %pOFn instead of device_node.name Rob Herring
@ 2018-08-28 10:06 ` Laurent Pinchart
2018-08-28 12:21 ` Rob Herring
0 siblings, 1 reply; 14+ messages in thread
From: Laurent Pinchart @ 2018-08-28 10:06 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Mauro Carvalho Chehab, Lad, Prabhakar,
Benoit Parrot, Philipp Zabel, Hyun Kwon, Michal Simek,
linux-media
Hi Rob,
Thank you for the patch.
On Tuesday, 28 August 2018 04:52:29 EEST Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Benoit Parrot <bparrot@ti.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Which tree would you like to merge this through ?
> ---
> drivers/media/i2c/tvp5150.c | 8 ++++----
> drivers/media/platform/davinci/vpif_capture.c | 3 +--
> drivers/media/platform/ti-vpe/cal.c | 8 ++++----
> drivers/media/platform/video-mux.c | 2 +-
> drivers/media/platform/xilinx/xilinx-dma.c | 8 ++++----
> 5 files changed, 14 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
> index 76e6bed5a1da..f337e523821b 100644
> --- a/drivers/media/i2c/tvp5150.c
> +++ b/drivers/media/i2c/tvp5150.c
> @@ -1403,8 +1403,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder,
> struct device_node *np) ret = of_property_read_u32(child, "input",
> &input_type);
> if (ret) {
> dev_err(decoder->sd.dev,
> - "missing type property in node %s\n",
> - child->name);
> + "missing type property in node %pOFn\n",
> + child);
> goto err_connector;
> }
>
> @@ -1439,8 +1439,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder,
> struct device_node *np) ret = of_property_read_string(child, "label",
> &name);
> if (ret < 0) {
> dev_err(decoder->sd.dev,
> - "missing label property in node %s\n",
> - child->name);
> + "missing label property in node %pOFn\n",
> + child);
> goto err_connector;
> }
>
> diff --git a/drivers/media/platform/davinci/vpif_capture.c
> b/drivers/media/platform/davinci/vpif_capture.c index
> a96f53ce8088..35fc69591d54 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1583,8 +1583,7 @@ vpif_capture_get_pdata(struct platform_device *pdev)
> goto done;
> }
>
> - dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
> - rem->name, rem);
> + dev_dbg(&pdev->dev, "Remote device %pOF found\n", rem);
> sdinfo->name = rem->full_name;
>
> pdata->asd[i] = devm_kzalloc(&pdev->dev,
> diff --git a/drivers/media/platform/ti-vpe/cal.c
> b/drivers/media/platform/ti-vpe/cal.c index d1febe5baa6d..77d755020e78
> 100644
> --- a/drivers/media/platform/ti-vpe/cal.c
> +++ b/drivers/media/platform/ti-vpe/cal.c
> @@ -1712,8 +1712,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx,
> int inst) v4l2_fwnode_endpoint_parse(of_fwnode_handle(remote_ep),
> endpoint);
>
> if (endpoint->bus_type != V4L2_MBUS_CSI2) {
> - ctx_err(ctx, "Port:%d sub-device %s is not a CSI2 device\n",
> - inst, sensor_node->name);
> + ctx_err(ctx, "Port:%d sub-device %pOFn is not a CSI2 device\n",
> + inst, sensor_node);
> goto cleanup_exit;
> }
>
> @@ -1732,8 +1732,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx,
> int inst) endpoint->bus.mipi_csi2.data_lanes[lane]);
> ctx_dbg(3, ctx, "\t>\n");
>
> - ctx_dbg(1, ctx, "Port: %d found sub-device %s\n",
> - inst, sensor_node->name);
> + ctx_dbg(1, ctx, "Port: %d found sub-device %pOFn\n",
> + inst, sensor_node);
>
> ctx->asd_list[0] = asd;
> ctx->notifier.subdevs = ctx->asd_list;
> diff --git a/drivers/media/platform/video-mux.c
> b/drivers/media/platform/video-mux.c index c01e1592ad0a..61a9bf716a05
> 100644
> --- a/drivers/media/platform/video-mux.c
> +++ b/drivers/media/platform/video-mux.c
> @@ -333,7 +333,7 @@ static int video_mux_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, vmux);
>
> v4l2_subdev_init(&vmux->subdev, &video_mux_subdev_ops);
> - snprintf(vmux->subdev.name, sizeof(vmux->subdev.name), "%s", np->name);
> + snprintf(vmux->subdev.name, sizeof(vmux->subdev.name), "%pOFn", np);
> vmux->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> vmux->subdev.dev = dev;
>
> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c
> b/drivers/media/platform/xilinx/xilinx-dma.c index
> d041f94be832..3c8fcf951c63 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -506,8 +506,8 @@ xvip_dma_querycap(struct file *file, void *fh, struct
> v4l2_capability *cap)
>
> strlcpy(cap->driver, "xilinx-vipp", sizeof(cap->driver));
> strlcpy(cap->card, dma->video.name, sizeof(cap->card));
> - snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s:%u",
> - dma->xdev->dev->of_node->name, dma->port);
> + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%pOFn:%u",
> + dma->xdev->dev->of_node, dma->port);
>
> return 0;
> }
> @@ -693,8 +693,8 @@ int xvip_dma_init(struct xvip_composite_device *xdev,
> struct xvip_dma *dma, dma->video.fops = &xvip_dma_fops;
> dma->video.v4l2_dev = &xdev->v4l2_dev;
> dma->video.queue = &dma->queue;
> - snprintf(dma->video.name, sizeof(dma->video.name), "%s %s %u",
> - xdev->dev->of_node->name,
> + snprintf(dma->video.name, sizeof(dma->video.name), "%pOFn %s %u",
> + xdev->dev->of_node,
> type == V4L2_BUF_TYPE_VIDEO_CAPTURE ? "output" : "input",
> port);
> dma->video.vfl_type = VFL_TYPE_GRABBER;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] media: Convert to using %pOFn instead of device_node.name
2018-08-28 10:06 ` Laurent Pinchart
@ 2018-08-28 12:21 ` Rob Herring
2018-09-12 15:10 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2018-08-28 12:21 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab,
Prabhakar Lad, Benoit Parrot, Philipp Zabel, Hyun Kwon,
Michal Simek, Linux Media Mailing List
On Tue, Aug 28, 2018 at 5:06 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Rob,
>
> Thank you for the patch.
>
> On Tuesday, 28 August 2018 04:52:29 EEST Rob Herring wrote:
> > In preparation to remove the node name pointer from struct device_node,
> > convert printf users to use the %pOFn format specifier.
> >
> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> > Cc: Benoit Parrot <bparrot@ti.com>
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: linux-media@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> Which tree would you like to merge this through ?
Media tree. There's no dependency.
Rob
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-08-28 1:52 ` [PATCH] staging: " Rob Herring
2018-08-28 6:34 ` Ian Arkver
@ 2018-08-28 15:44 ` Rob Herring
2018-09-12 15:17 ` Mauro Carvalho Chehab
1 sibling, 1 reply; 14+ messages in thread
From: Rob Herring @ 2018-08-28 15:44 UTC (permalink / raw)
To: linux-kernel
Cc: Ian Arkver, Steve Longerbeam, Philipp Zabel,
Mauro Carvalho Chehab, Greg Kroah-Hartman, linux-media, devel
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.
Cc: Steve Longerbeam <slongerbeam@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2:
- fix conditional use of node name vs devname for imx
drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++-----
drivers/staging/media/imx/imx-media-of.c | 4 ++--
drivers/staging/mt7621-eth/mdio.c | 4 ++--
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
index b0be80f05767..3f48f5ceb6ea 100644
--- a/drivers/staging/media/imx/imx-media-dev.c
+++ b/drivers/staging/media/imx/imx-media-dev.c
@@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
/* return -EEXIST if this asd already added */
if (find_async_subdev(imxmd, fwnode, devname)) {
- dev_dbg(imxmd->md.dev, "%s: already added %s\n",
- __func__, np ? np->name : devname);
+ if (np)
+ dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
+ __func__, np);
+ else
+ dev_dbg(imxmd->md.dev, "%s: already added %s\n",
+ __func__, devname);
ret = -EEXIST;
goto out;
}
@@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
if (fwnode) {
asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
asd->match.fwnode = fwnode;
+ dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n",
+ __func__, np);
} else {
asd->match_type = V4L2_ASYNC_MATCH_DEVNAME;
asd->match.device_name = devname;
imxasd->pdev = pdev;
+ dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n",
+ __func__, devname);
}
list_add_tail(&imxasd->list, &imxmd->asd_list);
imxmd->subdev_notifier.num_subdevs++;
- dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n",
- __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME");
-
out:
mutex_unlock(&imxmd->mutex);
return ret;
diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c
index acde372c6795..163437e421c5 100644
--- a/drivers/staging/media/imx/imx-media-of.c
+++ b/drivers/staging/media/imx/imx-media-of.c
@@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,
int i, num_ports, ret;
if (!of_device_is_available(sd_np)) {
- dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__,
- sd_np->name);
+ dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__,
+ sd_np);
/* unavailable is not an error */
return 0;
}
diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
index 7ad0c4141205..9ffa8f771235 100644
--- a/drivers/staging/mt7621-eth/mdio.c
+++ b/drivers/staging/mt7621-eth/mdio.c
@@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
_port = of_get_property(phy_node, "reg", NULL);
if (!_port || (be32_to_cpu(*_port) >= 0x20)) {
- pr_err("%s: invalid port id\n", phy_node->name);
+ pr_err("%pOFn: invalid port id\n", phy_node);
return -EINVAL;
}
port = be32_to_cpu(*_port);
@@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth)
eth->mii_bus->priv = eth;
eth->mii_bus->parent = eth->dev;
- snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
+ snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
err = of_mdiobus_register(eth->mii_bus, mii_np);
if (err)
goto err_free_bus;
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] media: Convert to using %pOFn instead of device_node.name
2018-08-28 12:21 ` Rob Herring
@ 2018-09-12 15:10 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2018-09-12 15:10 UTC (permalink / raw)
To: Rob Herring
Cc: Laurent Pinchart, linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab, Prabhakar Lad, Benoit Parrot,
Philipp Zabel, Hyun Kwon, Michal Simek, Linux Media Mailing List
Em Tue, 28 Aug 2018 07:21:46 -0500
Rob Herring <robh@kernel.org> escreveu:
> On Tue, Aug 28, 2018 at 5:06 AM Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Hi Rob,
> >
> > Thank you for the patch.
> >
> > On Tuesday, 28 August 2018 04:52:29 EEST Rob Herring wrote:
> > > In preparation to remove the node name pointer from struct device_node,
> > > convert printf users to use the %pOFn format specifier.
> > >
> > > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > > Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> > > Cc: Benoit Parrot <bparrot@ti.com>
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Cc: Michal Simek <michal.simek@xilinx.com>
> > > Cc: linux-media@vger.kernel.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >
> > Which tree would you like to merge this through ?
>
> Media tree. There's no dependency.
Ok. I'm applying it.
>
> Rob
Thanks,
Mauro
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-08-28 15:44 ` [PATCH v2] " Rob Herring
@ 2018-09-12 15:17 ` Mauro Carvalho Chehab
2018-09-12 20:26 ` Rob Herring
0 siblings, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2018-09-12 15:17 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Ian Arkver, Steve Longerbeam, Philipp Zabel,
Mauro Carvalho Chehab, Greg Kroah-Hartman, linux-media, devel
Em Tue, 28 Aug 2018 10:44:33 -0500
Rob Herring <robh@kernel.org> escreveu:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Steve Longerbeam <slongerbeam@gmail.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-media@vger.kernel.org
> Cc: devel@driverdev.osuosl.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> v2:
> - fix conditional use of node name vs devname for imx
>
> drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++-----
> drivers/staging/media/imx/imx-media-of.c | 4 ++--
> drivers/staging/mt7621-eth/mdio.c | 4 ++--
It would be better if you had submitted the staging/media stuff
on a separate patch, as they usually go via the media tree.
As I don't foresee any conflicts on that part of the code,
I'm Ok if Greg pick it and submit via his tree.
So,
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
If you prefer instead that I would pick the media part, please
split it into two patches.
Regards,
Mauro
> 3 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
> index b0be80f05767..3f48f5ceb6ea 100644
> --- a/drivers/staging/media/imx/imx-media-dev.c
> +++ b/drivers/staging/media/imx/imx-media-dev.c
> @@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
>
> /* return -EEXIST if this asd already added */
> if (find_async_subdev(imxmd, fwnode, devname)) {
> - dev_dbg(imxmd->md.dev, "%s: already added %s\n",
> - __func__, np ? np->name : devname);
> + if (np)
> + dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
> + __func__, np);
> + else
> + dev_dbg(imxmd->md.dev, "%s: already added %s\n",
> + __func__, devname);
> ret = -EEXIST;
> goto out;
> }
> @@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
> if (fwnode) {
> asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
> asd->match.fwnode = fwnode;
> + dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n",
> + __func__, np);
> } else {
> asd->match_type = V4L2_ASYNC_MATCH_DEVNAME;
> asd->match.device_name = devname;
> imxasd->pdev = pdev;
> + dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n",
> + __func__, devname);
> }
>
> list_add_tail(&imxasd->list, &imxmd->asd_list);
>
> imxmd->subdev_notifier.num_subdevs++;
>
> - dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n",
> - __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME");
> -
> out:
> mutex_unlock(&imxmd->mutex);
> return ret;
> diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c
> index acde372c6795..163437e421c5 100644
> --- a/drivers/staging/media/imx/imx-media-of.c
> +++ b/drivers/staging/media/imx/imx-media-of.c
> @@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,
> int i, num_ports, ret;
>
> if (!of_device_is_available(sd_np)) {
> - dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__,
> - sd_np->name);
> + dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__,
> + sd_np);
> /* unavailable is not an error */
> return 0;
> }
> diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
> index 7ad0c4141205..9ffa8f771235 100644
> --- a/drivers/staging/mt7621-eth/mdio.c
> +++ b/drivers/staging/mt7621-eth/mdio.c
> @@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
> _port = of_get_property(phy_node, "reg", NULL);
>
> if (!_port || (be32_to_cpu(*_port) >= 0x20)) {
> - pr_err("%s: invalid port id\n", phy_node->name);
> + pr_err("%pOFn: invalid port id\n", phy_node);
> return -EINVAL;
> }
> port = be32_to_cpu(*_port);
> @@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth)
> eth->mii_bus->priv = eth;
> eth->mii_bus->parent = eth->dev;
>
> - snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
> + snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
> err = of_mdiobus_register(eth->mii_bus, mii_np);
> if (err)
> goto err_free_bus;
> --
> 2.17.1
Thanks,
Mauro
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-09-12 15:17 ` Mauro Carvalho Chehab
@ 2018-09-12 20:26 ` Rob Herring
2018-09-12 21:07 ` Mauro Carvalho Chehab
2018-09-13 11:50 ` Joe Perches
0 siblings, 2 replies; 14+ messages in thread
From: Rob Herring @ 2018-09-12 20:26 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Joe Perches
Cc: linux-kernel@vger.kernel.org, Ian Arkver, Steve Longerbeam,
Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Linux Media Mailing List, devel
+Joe P
On Wed, Sep 12, 2018 at 10:17 AM Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
>
> Em Tue, 28 Aug 2018 10:44:33 -0500
> Rob Herring <robh@kernel.org> escreveu:
>
> > In preparation to remove the node name pointer from struct device_node,
> > convert printf users to use the %pOFn format specifier.
> >
> > Cc: Steve Longerbeam <slongerbeam@gmail.com>
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: linux-media@vger.kernel.org
> > Cc: devel@driverdev.osuosl.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > v2:
> > - fix conditional use of node name vs devname for imx
> >
> > drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++-----
> > drivers/staging/media/imx/imx-media-of.c | 4 ++--
> > drivers/staging/mt7621-eth/mdio.c | 4 ++--
>
> It would be better if you had submitted the staging/media stuff
> on a separate patch, as they usually go via the media tree.
Sorry, I thought Greg took all of staging.
A problem with MAINTAINERS is there is no way to tell who applies
patches for a given path vs. anyone else listed. This frequently
happens when the maintainer organization doesn't match the directory
org. If we distinguished this, then it would be quite easy to see when
you've created a patch that needs to be split to different maintainers
(or an explanation why it isn't). Whatever happened with splitting up
MAINTAINERS? If there was a file for each maintainer tree, then it
would be easier to extract that information.
Or maybe we just need to be stricter with the 'M' vs. 'R' tag and 'M'
means that is the person who applies the patch. I don't think many
drivers have their own tree and maintainer except for a few big ones.
Rob
>
> As I don't foresee any conflicts on that part of the code,
> I'm Ok if Greg pick it and submit via his tree.
>
> So,
>
> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
>
> If you prefer instead that I would pick the media part, please
> split it into two patches.
>
> Regards,
> Mauro
>
> > 3 files changed, 14 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
> > index b0be80f05767..3f48f5ceb6ea 100644
> > --- a/drivers/staging/media/imx/imx-media-dev.c
> > +++ b/drivers/staging/media/imx/imx-media-dev.c
> > @@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
> >
> > /* return -EEXIST if this asd already added */
> > if (find_async_subdev(imxmd, fwnode, devname)) {
> > - dev_dbg(imxmd->md.dev, "%s: already added %s\n",
> > - __func__, np ? np->name : devname);
> > + if (np)
> > + dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
> > + __func__, np);
> > + else
> > + dev_dbg(imxmd->md.dev, "%s: already added %s\n",
> > + __func__, devname);
> > ret = -EEXIST;
> > goto out;
> > }
> > @@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,
> > if (fwnode) {
> > asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
> > asd->match.fwnode = fwnode;
> > + dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n",
> > + __func__, np);
> > } else {
> > asd->match_type = V4L2_ASYNC_MATCH_DEVNAME;
> > asd->match.device_name = devname;
> > imxasd->pdev = pdev;
> > + dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n",
> > + __func__, devname);
> > }
> >
> > list_add_tail(&imxasd->list, &imxmd->asd_list);
> >
> > imxmd->subdev_notifier.num_subdevs++;
> >
> > - dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n",
> > - __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME");
> > -
> > out:
> > mutex_unlock(&imxmd->mutex);
> > return ret;
> > diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c
> > index acde372c6795..163437e421c5 100644
> > --- a/drivers/staging/media/imx/imx-media-of.c
> > +++ b/drivers/staging/media/imx/imx-media-of.c
> > @@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,
> > int i, num_ports, ret;
> >
> > if (!of_device_is_available(sd_np)) {
> > - dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__,
> > - sd_np->name);
> > + dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__,
> > + sd_np);
> > /* unavailable is not an error */
> > return 0;
> > }
> > diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
> > index 7ad0c4141205..9ffa8f771235 100644
> > --- a/drivers/staging/mt7621-eth/mdio.c
> > +++ b/drivers/staging/mt7621-eth/mdio.c
> > @@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
> > _port = of_get_property(phy_node, "reg", NULL);
> >
> > if (!_port || (be32_to_cpu(*_port) >= 0x20)) {
> > - pr_err("%s: invalid port id\n", phy_node->name);
> > + pr_err("%pOFn: invalid port id\n", phy_node);
> > return -EINVAL;
> > }
> > port = be32_to_cpu(*_port);
> > @@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth)
> > eth->mii_bus->priv = eth;
> > eth->mii_bus->parent = eth->dev;
> >
> > - snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
> > + snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
> > err = of_mdiobus_register(eth->mii_bus, mii_np);
> > if (err)
> > goto err_free_bus;
> > --
> > 2.17.1
>
>
>
> Thanks,
> Mauro
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-09-12 20:26 ` Rob Herring
@ 2018-09-12 21:07 ` Mauro Carvalho Chehab
2018-09-12 22:48 ` Rob Herring
2018-09-13 11:50 ` Joe Perches
1 sibling, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2018-09-12 21:07 UTC (permalink / raw)
To: Rob Herring
Cc: Joe Perches, linux-kernel@vger.kernel.org, Ian Arkver,
Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Linux Media Mailing List, devel
Em Wed, 12 Sep 2018 15:26:48 -0500
Rob Herring <robh@kernel.org> escreveu:
> +Joe P
>
> On Wed, Sep 12, 2018 at 10:17 AM Mauro Carvalho Chehab
> <mchehab+samsung@kernel.org> wrote:
> >
> > Em Tue, 28 Aug 2018 10:44:33 -0500
> > Rob Herring <robh@kernel.org> escreveu:
> >
> > > In preparation to remove the node name pointer from struct device_node,
> > > convert printf users to use the %pOFn format specifier.
> > >
> > > Cc: Steve Longerbeam <slongerbeam@gmail.com>
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: linux-media@vger.kernel.org
> > > Cc: devel@driverdev.osuosl.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > > v2:
> > > - fix conditional use of node name vs devname for imx
> > >
> > > drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++-----
> > > drivers/staging/media/imx/imx-media-of.c | 4 ++--
> > > drivers/staging/mt7621-eth/mdio.c | 4 ++--
> >
> > It would be better if you had submitted the staging/media stuff
> > on a separate patch, as they usually go via the media tree.
>
> Sorry, I thought Greg took all of staging.
No, I usually take media patches on staging. It seems that at least
the IIO subsystem does the same:
IIO SUBSYSTEM AND DRIVERS
M: Jonathan Cameron <jic23@kernel.org>
R: Hartmut Knaack <knaack.h@gmx.de>
R: Lars-Peter Clausen <lars@metafoo.de>
R: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
L: linux-iio@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
S: Maintained
F: Documentation/ABI/testing/configfs-iio*
F: Documentation/ABI/testing/sysfs-bus-iio*
F: Documentation/devicetree/bindings/iio/
F: drivers/iio/
F: drivers/staging/iio/
F: include/linux/iio/
F: tools/iio/
Anyway, as I said before, I don't have any issues if Greg takes
this specific patch.
> A problem with MAINTAINERS is there is no way to tell who applies
> patches for a given path vs. anyone else listed. This frequently
> happens when the maintainer organization doesn't match the directory
> org. If we distinguished this, then it would be quite easy to see when
> you've created a patch that needs to be split to different maintainers
> (or an explanation why it isn't). Whatever happened with splitting up
> MAINTAINERS? If there was a file for each maintainer tree, then it
> would be easier to extract that information.
Yes, but, on the other hand, get_maintainers.pl would likely
take more time to process, if a patch touches multiple subsystems.
>
> Or maybe we just need to be stricter with the 'M' vs. 'R' tag and 'M'
> means that is the person who applies the patch. I don't think many
> drivers have their own tree and maintainer except for a few big ones.
Hmm... just getting a random file under staging/media:
./scripts/get_maintainer.pl -f drivers/staging/media/imx/imx-ic.h
Steve Longerbeam <slongerbeam@gmail.com> (maintainer:MEDIA DRIVERS FOR FREESCALE IMX)
Philipp Zabel <p.zabel@pengutronix.de> (maintainer:MEDIA DRIVERS FOR FREESCALE IMX)
Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB))
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:STAGING SUBSYSTEM)
linux-media@vger.kernel.org (open list:MEDIA DRIVERS FOR FREESCALE IMX)
devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
linux-kernel@vger.kernel.org (open list)
It seems that the maintainers are already ordered by the tree
depth (placing the most relevant results first).
So, both driver maintainers appear first, then me and finally
Greg (as supporter).
Mailing lists are also ordered by relevance: media ML, then staging
ML and finally LKML.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-09-12 21:07 ` Mauro Carvalho Chehab
@ 2018-09-12 22:48 ` Rob Herring
0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2018-09-12 22:48 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Joe Perches, linux-kernel@vger.kernel.org, Ian Arkver,
Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Linux Media Mailing List, devel
On Wed, Sep 12, 2018 at 4:07 PM Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
>
> Em Wed, 12 Sep 2018 15:26:48 -0500
> Rob Herring <robh@kernel.org> escreveu:
>
> > +Joe P
> >
> > On Wed, Sep 12, 2018 at 10:17 AM Mauro Carvalho Chehab
> > <mchehab+samsung@kernel.org> wrote:
> > >
> > > Em Tue, 28 Aug 2018 10:44:33 -0500
> > > Rob Herring <robh@kernel.org> escreveu:
> > >
> > > > In preparation to remove the node name pointer from struct device_node,
> > > > convert printf users to use the %pOFn format specifier.
> > > >
> > > > Cc: Steve Longerbeam <slongerbeam@gmail.com>
> > > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > Cc: linux-media@vger.kernel.org
> > > > Cc: devel@driverdev.osuosl.org
> > > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > > ---
> > > > v2:
> > > > - fix conditional use of node name vs devname for imx
> > > >
> > > > drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++-----
> > > > drivers/staging/media/imx/imx-media-of.c | 4 ++--
> > > > drivers/staging/mt7621-eth/mdio.c | 4 ++--
> > >
> > > It would be better if you had submitted the staging/media stuff
> > > on a separate patch, as they usually go via the media tree.
> >
> > Sorry, I thought Greg took all of staging.
>
> No, I usually take media patches on staging. It seems that at least
> the IIO subsystem does the same:
>
> IIO SUBSYSTEM AND DRIVERS
> M: Jonathan Cameron <jic23@kernel.org>
> R: Hartmut Knaack <knaack.h@gmx.de>
> R: Lars-Peter Clausen <lars@metafoo.de>
> R: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> L: linux-iio@vger.kernel.org
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
> S: Maintained
> F: Documentation/ABI/testing/configfs-iio*
> F: Documentation/ABI/testing/sysfs-bus-iio*
> F: Documentation/devicetree/bindings/iio/
> F: drivers/iio/
> F: drivers/staging/iio/
> F: include/linux/iio/
> F: tools/iio/
Yes, the information is there, but needs human processing.
> Anyway, as I said before, I don't have any issues if Greg takes
> this specific patch.
I know. I'm just thinking about how to improve things. Ideally, what
I'd like is a script that spits out a To list for who applies the
patch and a Cc list of reviewers.
> > A problem with MAINTAINERS is there is no way to tell who applies
> > patches for a given path vs. anyone else listed. This frequently
> > happens when the maintainer organization doesn't match the directory
> > org. If we distinguished this, then it would be quite easy to see when
> > you've created a patch that needs to be split to different maintainers
> > (or an explanation why it isn't). Whatever happened with splitting up
> > MAINTAINERS? If there was a file for each maintainer tree, then it
> > would be easier to extract that information.
>
> Yes, but, on the other hand, get_maintainers.pl would likely
> take more time to process, if a patch touches multiple subsystems.
>
> >
> > Or maybe we just need to be stricter with the 'M' vs. 'R' tag and 'M'
> > means that is the person who applies the patch. I don't think many
> > drivers have their own tree and maintainer except for a few big ones.
>
> Hmm... just getting a random file under staging/media:
>
> ./scripts/get_maintainer.pl -f drivers/staging/media/imx/imx-ic.h
> Steve Longerbeam <slongerbeam@gmail.com> (maintainer:MEDIA DRIVERS FOR FREESCALE IMX)
> Philipp Zabel <p.zabel@pengutronix.de> (maintainer:MEDIA DRIVERS FOR FREESCALE IMX)
> Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB))
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:STAGING SUBSYSTEM)
> linux-media@vger.kernel.org (open list:MEDIA DRIVERS FOR FREESCALE IMX)
> devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
> linux-kernel@vger.kernel.org (open list)
>
> It seems that the maintainers are already ordered by the tree
> depth (placing the most relevant results first).
Most relevant in the sense of who reviews and cares about the changes,
but not to answer who applies this patch. I could say I just need to
ignore supporters and look at the last maintainer, but then that
breaks for the case below. I don't think 'maintainer' vs. 'supporter'
is very well maintained either.
$ scripts/get_maintainer.pl -f drivers/staging/olpc_dcon/
Jens Frederich <jfrederich@gmail.com> (maintainer:STAGING - OLPC
SECONDARY DISPLAY CONTROLLER (DCON))
Daniel Drake <dsd@laptop.org> (maintainer:STAGING - OLPC SECONDARY
DISPLAY CONTROLLER (DCON))
Jon Nettleton <jon.nettleton@gmail.com> (maintainer:STAGING - OLPC
SECONDARY DISPLAY CONTROLLER (DCON))
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:STAGING SUBSYSTEM)
devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
linux-kernel@vger.kernel.org (open list)
Maybe Jon has a tree and applies it. Who knows... You either have to
know who are "real" maintainers (the ones applying patches) or go look
at git history to see Greg is the only non-author S-o-B.
> So, both driver maintainers appear first, then me and finally
> Greg (as supporter).
>
> Mailing lists are also ordered by relevance: media ML, then staging
> ML and finally LKML.
Another clue, yes, but something you can script?
Rob
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-09-12 20:26 ` Rob Herring
2018-09-12 21:07 ` Mauro Carvalho Chehab
@ 2018-09-13 11:50 ` Joe Perches
2018-09-13 21:26 ` Rob Herring
1 sibling, 1 reply; 14+ messages in thread
From: Joe Perches @ 2018-09-13 11:50 UTC (permalink / raw)
To: Rob Herring, Mauro Carvalho Chehab
Cc: linux-kernel@vger.kernel.org, Ian Arkver, Steve Longerbeam,
Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Linux Media Mailing List, devel
On Wed, 2018-09-12 at 15:26 -0500, Rob Herring wrote:
> A problem with MAINTAINERS is there is no way to tell who applies
> patches for a given path vs. anyone else listed.
try the --scm option
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-09-13 11:50 ` Joe Perches
@ 2018-09-13 21:26 ` Rob Herring
2018-09-14 11:41 ` Joe Perches
0 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2018-09-13 21:26 UTC (permalink / raw)
To: Joe Perches
Cc: Mauro Carvalho Chehab, linux-kernel@vger.kernel.org, Ian Arkver,
Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Linux Media Mailing List, devel
On Thu, Sep 13, 2018 at 3:45 PM Joe Perches <joe@perches.com> wrote:
>
> On Wed, 2018-09-12 at 15:26 -0500, Rob Herring wrote:
> > A problem with MAINTAINERS is there is no way to tell who applies
> > patches for a given path vs. anyone else listed.
>
> try the --scm option
That kind of helps if the maintainer has listed a tree, but gives
wrong results if not. And you still have to figure out who owns which
tree. That's not hard, but it's not scriptable.
IMO, we should reserve 'M:' for maintainers with trees and use 'R:'
driver maintainers. That's redefining M as "maintainer" rather than
"mail patches to". You could still have both for a entry so you can
know who to go bug when your patch hasn't been applied.
Rob
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name
2018-09-13 21:26 ` Rob Herring
@ 2018-09-14 11:41 ` Joe Perches
0 siblings, 0 replies; 14+ messages in thread
From: Joe Perches @ 2018-09-14 11:41 UTC (permalink / raw)
To: Rob Herring
Cc: Mauro Carvalho Chehab, linux-kernel@vger.kernel.org, Ian Arkver,
Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Linux Media Mailing List, devel
On Thu, 2018-09-13 at 16:26 -0500, Rob Herring wrote:
> On Thu, Sep 13, 2018 at 3:45 PM Joe Perches <joe@perches.com> wrote:
> >
> > On Wed, 2018-09-12 at 15:26 -0500, Rob Herring wrote:
> > > A problem with MAINTAINERS is there is no way to tell who applies
> > > patches for a given path vs. anyone else listed.
> >
> > try the --scm option
>
> That kind of helps if the maintainer has listed a tree, but gives
> wrong results if not.
If there isn't a tree listed, it's not really maintained.
> And you still have to figure out who owns which
> tree. That's not hard, but it's not scriptable.
a get_maintainer scripted loop using
--maxdepth=<incrementing_from_1> --scm --m --nor --nol
until a result could work.
> IMO, we should reserve 'M:' for maintainers with trees and use 'R:'
> driver maintainers. That's redefining M as "maintainer" rather than
> "mail patches to". You could still have both for a entry so you can
> know who to go bug when your patch hasn't been applied.
IMO, most M: entries in MAINTAINERS are either reviewers or
used-once when created and longer active or just vanity.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-09-14 16:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180828015252.28511-1-robh@kernel.org>
2018-08-28 1:52 ` [PATCH] media: Convert to using %pOFn instead of device_node.name Rob Herring
2018-08-28 10:06 ` Laurent Pinchart
2018-08-28 12:21 ` Rob Herring
2018-09-12 15:10 ` Mauro Carvalho Chehab
2018-08-28 1:52 ` [PATCH] staging: " Rob Herring
2018-08-28 6:34 ` Ian Arkver
2018-08-28 15:44 ` [PATCH v2] " Rob Herring
2018-09-12 15:17 ` Mauro Carvalho Chehab
2018-09-12 20:26 ` Rob Herring
2018-09-12 21:07 ` Mauro Carvalho Chehab
2018-09-12 22:48 ` Rob Herring
2018-09-13 11:50 ` Joe Perches
2018-09-13 21:26 ` Rob Herring
2018-09-14 11:41 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).