linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] sound: Convert to using %pOF instead of full_name
       [not found] <20170721192835.25555-1-robh@kernel.org>
@ 2017-07-21 19:28 ` Rob Herring
  2017-07-21 20:23   ` Takashi Iwai
  2017-07-21 19:28 ` [PATCH v2] sound: fsl_dma: remove dma_object path member Rob Herring
  1 sibling, 1 reply; 3+ messages in thread
From: Rob Herring @ 2017-07-21 19:28 UTC (permalink / raw)
  To: Takashi Iwai, Mark Brown
  Cc: linux-kernel, devicetree, Johannes Berg, Jaroslav Kysela,
	Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam, Liam Girdwood,
	linuxppc-dev, alsa-devel

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: Johannes Berg <johannes@sipsolutions.net>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Timur Tabi <timur@tabi.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: alsa-devel@alsa-project.org
---
v2:
- Add printf specifier change for fsl_dma.c

 sound/aoa/codecs/tas.c     |  4 ++--
 sound/soc/fsl/fsl_dma.c    |  4 ++--
 sound/soc/fsl/imx-audmux.c | 16 ++++++++--------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c
index 733b6365dad6..15c05755d270 100644
--- a/sound/aoa/codecs/tas.c
+++ b/sound/aoa/codecs/tas.c
@@ -905,8 +905,8 @@ static int tas_i2c_probe(struct i2c_client *client,
 		goto fail;
 	}
 	printk(KERN_DEBUG
-	       "snd-aoa-codec-tas: tas found, addr 0x%02x on %s\n",
-	       (unsigned int)client->addr, node->full_name);
+	       "snd-aoa-codec-tas: tas found, addr 0x%02x on %pOF\n",
+	       (unsigned int)client->addr, node);
 	return 0;
  fail:
 	mutex_destroy(&tas->mtx);
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index ccadefceeff2..ed8ea002902d 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -897,8 +897,8 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
 
 	ret = of_address_to_resource(ssi_np, 0, &res);
 	if (ret) {
-		dev_err(&pdev->dev, "could not determine resources for %s\n",
-			ssi_np->full_name);
+		dev_err(&pdev->dev, "could not determine resources for %pOF\n",
+			ssi_np);
 		of_node_put(ssi_np);
 		return ret;
 	}
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index fc57da341d61..392d5eef356d 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -268,13 +268,13 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
 
 		ret = of_property_read_u32(child, "fsl,audmux-port", &port);
 		if (ret) {
-			dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%s\"\n",
-					child->full_name);
+			dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%pOF\"\n",
+					child);
 			continue;
 		}
 		if (!of_property_read_bool(child, "fsl,port-config")) {
-			dev_warn(&pdev->dev, "child node \"%s\" does not have property fsl,port-config\n",
-					child->full_name);
+			dev_warn(&pdev->dev, "child node \"%pOF\" does not have property fsl,port-config\n",
+					child);
 			continue;
 		}
 
@@ -292,15 +292,15 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
 		}
 
 		if (ret != -EOVERFLOW) {
-			dev_err(&pdev->dev, "Failed to read u32 at index %d of child %s\n",
-					i, child->full_name);
+			dev_err(&pdev->dev, "Failed to read u32 at index %d of child %pOF\n",
+					i, child);
 			continue;
 		}
 
 		if (audmux_type == IMX31_AUDMUX) {
 			if (i % 2) {
-				dev_err(&pdev->dev, "One pdcr value is missing in child node %s\n",
-						child->full_name);
+				dev_err(&pdev->dev, "One pdcr value is missing in child node %pOF\n",
+						child);
 				continue;
 			}
 			imx_audmux_v2_configure_port(port, ptcr, pdcr);
-- 
2.11.0

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

* [PATCH v2] sound: fsl_dma: remove dma_object path member
       [not found] <20170721192835.25555-1-robh@kernel.org>
  2017-07-21 19:28 ` [PATCH v2] sound: Convert to using %pOF instead of full_name Rob Herring
@ 2017-07-21 19:28 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2017-07-21 19:28 UTC (permalink / raw)
  To: Takashi Iwai, Mark Brown
  Cc: linux-kernel, devicetree, Timur Tabi, Nicolin Chen, Xiubo Li,
	Fabio Estevam, Liam Girdwood, Jaroslav Kysela, alsa-devel,
	linuxppc-dev

dma_object.path is unused, so rather than fix it to work with DT
full_name changes, just remove it.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Timur Tabi <timur@tabi.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linuxppc-dev@lists.ozlabs.org
---
v2:
- Move printf specifier change to correct patch

 sound/soc/fsl/fsl_dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index ed8ea002902d..b38dd328c783 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -63,7 +63,6 @@ struct dma_object {
 	struct ccsr_dma_channel __iomem *channel;
 	unsigned int irq;
 	bool assigned;
-	char path[1];
 };
 
 /*
@@ -903,14 +902,13 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	dma = kzalloc(sizeof(*dma) + strlen(np->full_name), GFP_KERNEL);
+	dma = kzalloc(sizeof(*dma), GFP_KERNEL);
 	if (!dma) {
 		dev_err(&pdev->dev, "could not allocate dma object\n");
 		of_node_put(ssi_np);
 		return -ENOMEM;
 	}
 
-	strcpy(dma->path, np->full_name);
 	dma->dai.ops = &fsl_dma_ops;
 	dma->dai.pcm_new = fsl_dma_new;
 	dma->dai.pcm_free = fsl_dma_free_dma_buffers;
-- 
2.11.0

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

* Re: [PATCH v2] sound: Convert to using %pOF instead of full_name
  2017-07-21 19:28 ` [PATCH v2] sound: Convert to using %pOF instead of full_name Rob Herring
@ 2017-07-21 20:23   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-07-21 20:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown, alsa-devel, Liam Girdwood, Nicolin Chen, Xiubo Li,
	linuxppc-dev, Fabio Estevam, Jaroslav Kysela, Johannes Berg,
	Timur Tabi, devicetree, linux-kernel

On Fri, 21 Jul 2017 21:28:34 +0200,
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: Johannes Berg <johannes@sipsolutions.net>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Timur Tabi <timur@tabi.org>
> Cc: Nicolin Chen <nicoleotsuka@gmail.com>
> Cc: Xiubo Li <Xiubo.Lee@gmail.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: alsa-devel@alsa-project.org
> ---
> v2:
> - Add printf specifier change for fsl_dma.c

Could you split this one to the one for sound/aoa/* and one for
sound/soc/fsl?  It makes much easier to apply the patch, as the former
goes directly to me while the latter through Mark's ASoC tree.


thanks,

Takashi


> 
>  sound/aoa/codecs/tas.c     |  4 ++--
>  sound/soc/fsl/fsl_dma.c    |  4 ++--
>  sound/soc/fsl/imx-audmux.c | 16 ++++++++--------
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c
> index 733b6365dad6..15c05755d270 100644
> --- a/sound/aoa/codecs/tas.c
> +++ b/sound/aoa/codecs/tas.c
> @@ -905,8 +905,8 @@ static int tas_i2c_probe(struct i2c_client *client,
>  		goto fail;
>  	}
>  	printk(KERN_DEBUG
> -	       "snd-aoa-codec-tas: tas found, addr 0x%02x on %s\n",
> -	       (unsigned int)client->addr, node->full_name);
> +	       "snd-aoa-codec-tas: tas found, addr 0x%02x on %pOF\n",
> +	       (unsigned int)client->addr, node);
>  	return 0;
>   fail:
>  	mutex_destroy(&tas->mtx);
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index ccadefceeff2..ed8ea002902d 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -897,8 +897,8 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
>  
>  	ret = of_address_to_resource(ssi_np, 0, &res);
>  	if (ret) {
> -		dev_err(&pdev->dev, "could not determine resources for %s\n",
> -			ssi_np->full_name);
> +		dev_err(&pdev->dev, "could not determine resources for %pOF\n",
> +			ssi_np);
>  		of_node_put(ssi_np);
>  		return ret;
>  	}
> diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
> index fc57da341d61..392d5eef356d 100644
> --- a/sound/soc/fsl/imx-audmux.c
> +++ b/sound/soc/fsl/imx-audmux.c
> @@ -268,13 +268,13 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
>  
>  		ret = of_property_read_u32(child, "fsl,audmux-port", &port);
>  		if (ret) {
> -			dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%s\"\n",
> -					child->full_name);
> +			dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%pOF\"\n",
> +					child);
>  			continue;
>  		}
>  		if (!of_property_read_bool(child, "fsl,port-config")) {
> -			dev_warn(&pdev->dev, "child node \"%s\" does not have property fsl,port-config\n",
> -					child->full_name);
> +			dev_warn(&pdev->dev, "child node \"%pOF\" does not have property fsl,port-config\n",
> +					child);
>  			continue;
>  		}
>  
> @@ -292,15 +292,15 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
>  		}
>  
>  		if (ret != -EOVERFLOW) {
> -			dev_err(&pdev->dev, "Failed to read u32 at index %d of child %s\n",
> -					i, child->full_name);
> +			dev_err(&pdev->dev, "Failed to read u32 at index %d of child %pOF\n",
> +					i, child);
>  			continue;
>  		}
>  
>  		if (audmux_type == IMX31_AUDMUX) {
>  			if (i % 2) {
> -				dev_err(&pdev->dev, "One pdcr value is missing in child node %s\n",
> -						child->full_name);
> +				dev_err(&pdev->dev, "One pdcr value is missing in child node %pOF\n",
> +						child);
>  				continue;
>  			}
>  			imx_audmux_v2_configure_port(port, ptcr, pdcr);
> -- 
> 2.11.0
> 
> 

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170721192835.25555-1-robh@kernel.org>
2017-07-21 19:28 ` [PATCH v2] sound: Convert to using %pOF instead of full_name Rob Herring
2017-07-21 20:23   ` Takashi Iwai
2017-07-21 19:28 ` [PATCH v2] sound: fsl_dma: remove dma_object path member Rob Herring

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).