All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	alsa-devel@alsa-project.org, timur@tabi.org
Subject: [PATCH 2/2] ASoC: fsl_dma: Do not use 'full_name' node reference
Date: Wed,  7 Jan 2015 15:21:52 -0200	[thread overview]
Message-ID: <1420651312-21671-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1420651312-21671-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

The only usage of 'full_name' is inside an error message, which provides a 
rather verbose node path.

A more concise error message can be obtained by using 'pdev->name' instead. It 
also makes the kzalloc calculation simpler, as we don't need to take the length
of full_name into account.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Buit tested only.

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

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 026da0a..770de20 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -897,12 +897,12 @@ 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);
+			pdev->name);
 		of_node_put(ssi_np);
 		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);
-- 
1.9.1

  reply	other threads:[~2015-01-07 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 17:21 [PATCH 1/2] ASoC: fsl_dma: Remove 'path' field from dma_object struct Fabio Estevam
2015-01-07 17:21 ` Fabio Estevam [this message]
2015-01-07 17:26   ` [PATCH 2/2] ASoC: fsl_dma: Do not use 'full_name' node reference Timur Tabi
2015-01-07 17:26   ` Lars-Peter Clausen
2015-01-07 17:27     ` Timur Tabi
2015-01-07 17:47       ` Fabio Estevam
2015-01-07 17:54         ` Timur Tabi
2015-01-07 17:23 ` [PATCH 1/2] ASoC: fsl_dma: Remove 'path' field from dma_object struct Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420651312-21671-2-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@freescale.com \
    --cc=timur@tabi.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.