From patchwork Wed Jan 7 17:47:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5586801 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DCEBB9F357 for ; Wed, 7 Jan 2015 17:48:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12E5920122 for ; Wed, 7 Jan 2015 17:48:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CFCAB20117 for ; Wed, 7 Jan 2015 17:48:13 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E1744265130; Wed, 7 Jan 2015 18:48:12 +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 F1B5D2605DC; Wed, 7 Jan 2015 18:48:03 +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 5E0982605DC; Wed, 7 Jan 2015 18:48:03 +0100 (CET) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by alsa0.perex.cz (Postfix) with ESMTP id 60CE926053B for ; Wed, 7 Jan 2015 18:47:56 +0100 (CET) Received: by mail-la0-f54.google.com with SMTP id pv20so4857528lab.13 for ; Wed, 07 Jan 2015 09:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QpKz1SY2n5M+zciUVH+uF/q38UVJwVZ7n0tPcoUCW94=; b=IEouwM2j4zOx6UTRQFSpEVMgA8UeOif9TcVZTmFtfbN/4JAGTw1/b9tS62Dx/WkKLU +4jgcw3E7ejXqHWXzTfirMx0U7s81AstYI16GYlukIfi1Wr6sQdE2QDo/W9GLeiJLwwX GfFxHpwX0J0TWWXpq+1zxJc6aJgNUHKdKkm7nIm77TcMgebuapVBNiaek+/7ObJZgeEu y2NzWgaXB4Mmlzd7a6KJn4EAVufQ4iDnw5H4ht6YbGUdnVH4I1XILJFH0TBJJJApkJ5X 15D+Zz/Iw125cRIWnBlE2Z8nfnZoOgiCsbrmkEG7p8DKnLBIXkoMqXwShJ3EmVakyU1B RfrA== MIME-Version: 1.0 X-Received: by 10.112.125.202 with SMTP id ms10mr6717620lbb.33.1420652875978; Wed, 07 Jan 2015 09:47:55 -0800 (PST) Received: by 10.152.179.137 with HTTP; Wed, 7 Jan 2015 09:47:55 -0800 (PST) In-Reply-To: <54AD6C92.7060007@tabi.org> References: <1420651312-21671-1-git-send-email-festevam@gmail.com> <1420651312-21671-2-git-send-email-festevam@gmail.com> <54AD6C55.7030600@metafoo.de> <54AD6C92.7060007@tabi.org> Date: Wed, 7 Jan 2015 15:47:55 -0200 Message-ID: From: Fabio Estevam To: Timur Tabi Cc: Fabio Estevam , Mark Brown , Lars-Peter Clausen , "alsa-devel@alsa-project.org" Subject: Re: [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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jan 7, 2015 at 3:27 PM, Timur Tabi wrote: > Lars-Peter Clausen wrote: >>> >>> >>> - dma = kzalloc(sizeof(*dma) + strlen(np->full_name), GFP_KERNEL); >>> + dma = kzalloc(sizeof(*dma), GFP_KERNEL); >> >> >> This should probably be part of patch 1. > > > I think you're right. Thanks, so I can do it on a single patch then: diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 93d7e56..72e7979 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]; }; /* @@ -897,20 +896,18 @@ 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: %d\n", ret); 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); 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;