From patchwork Wed Jan 7 17:21:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5586001 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30929BF6C3 for ; Wed, 7 Jan 2015 17:23:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B898200C6 for ; Wed, 7 Jan 2015 17:23:00 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 443142010B for ; Wed, 7 Jan 2015 17:22:59 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 526332651AA; Wed, 7 Jan 2015 18:22:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7803526509D; Wed, 7 Jan 2015 18:22:26 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8E9FA2650BC; Wed, 7 Jan 2015 18:22:24 +0100 (CET) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by alsa0.perex.cz (Postfix) with ESMTP id 70C0B260534 for ; Wed, 7 Jan 2015 18:22:17 +0100 (CET) Received: by mail-vc0-f176.google.com with SMTP id hq12so643139vcb.35 for ; Wed, 07 Jan 2015 09:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ULbGMTYmCMuSGCk3eUcLIKZGvM+LRReoWiPJJ0SS85c=; b=OlK2belxBYFJcdZuSY39C1DUPh1ZPEfM9zfjSN5CPffji4kFGma4x0ecd/EDCKg5Fq RvXuAKA+o2XqXARJdkl5/+8yFK9N2jUHBNv4s5cFUvsBC4VCx9m+4lqIo1qA2QpLJrBK NjWSmrP1wiqJdq2ZCtZQBnGIMvBpA2qNARUVy9hlAlKFYLN92JeSMcVhT7MNnitBXess kugPf/4abGyUytJiq4rqdWaMHgJzMd65Xeslk9gUU2HQ2kvUjiuumdDCgebKLdAkntN5 G5pvS1YyroK+TSjpjPCxTDLCpZsGd+0gnLIiRzqktClJwtYfuCzio4WQ9yVntXSPGu9p o1Hg== X-Received: by 10.221.58.204 with SMTP id wl12mr3802857vcb.78.1420651336532; Wed, 07 Jan 2015 09:22:16 -0800 (PST) Received: from localhost.localdomain ([179.159.214.140]) by mx.google.com with ESMTPSA id 14sm612413vdb.14.2015.01.07.09.22.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jan 2015 09:22:15 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 7 Jan 2015 15:21:52 -0200 Message-Id: <1420651312-21671-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420651312-21671-1-git-send-email-festevam@gmail.com> References: <1420651312-21671-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org, timur@tabi.org Subject: [alsa-devel] [PATCH 2/2] ASoC: fsl_dma: Do not use 'full_name' node reference X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam 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 --- 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);