From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jackson Subject: Re: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests Date: Fri, 12 Dec 2014 09:39:56 +0000 Message-ID: <548AB7EC.4020502@arm.com> References: <97f65b6037b9ac676f6ca7717a230a68cbe81fd1.1418372910.git.Andrew.Jackson@arm.com> <1418376671.18092.40.camel@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by alsa0.perex.cz (Postfix) with ESMTP id 4C07626546B for ; Fri, 12 Dec 2014 10:39:57 +0100 (CET) In-Reply-To: <1418376671.18092.40.camel@perches.com> 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 To: Joe Perches Cc: "alsa-devel@alsa-project.org" , Lars-Peter Clausen , Arnd Bergmann , Takashi Iwai , "linux-kernel@vger.kernel.org" , Liviu Dudau , Liam Girdwood , Rajeev Kumar , Mark Brown , "linux-arm-kernel@lists.infradead.org" List-Id: alsa-devel@alsa-project.org On 12/12/14 09:31, Joe Perches wrote: > On Fri, 2014-12-12 at 09:25 +0000, Andrew Jackson wrote: >> The devm_XXX allocation functions print a message on failure, >> so additional messages are not required. > [] >> diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c > [] >> @@ -345,26 +345,17 @@ static int dw_i2s_probe(struct platform_device *pdev) >> } >> >> dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); >> - if (!dw_i2s_dai) { >> - dev_err(&pdev->dev, "mem allocation failed for dai driver\n"); >> + if (!dw_i2s_dai) >> return -ENOMEM; >> - } > > ok. > >> dw_i2s_dai->ops = &dw_i2s_dai_ops; >> dw_i2s_dai->suspend = dw_i2s_suspend; >> dw_i2s_dai->resume = dw_i2s_resume; >> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - if (!res) { >> - dev_err(&pdev->dev, "no i2s resource defined\n"); >> - return -ENODEV; >> - } >> - > > Why delete this? Lars-Peter said that it was unnecessary: see . > >> dev->i2s_base = devm_ioremap_resource(&pdev->dev, res); >> - if (IS_ERR(dev->i2s_base)) { >> - dev_err(&pdev->dev, "ioremap fail for i2s_region\n"); >> + if (IS_ERR(dev->i2s_base)) >> return PTR_ERR(dev->i2s_base); >> - } > > or this? Ditto Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew.Jackson@arm.com (Andrew Jackson) Date: Fri, 12 Dec 2014 09:39:56 +0000 Subject: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests In-Reply-To: <1418376671.18092.40.camel@perches.com> References: <97f65b6037b9ac676f6ca7717a230a68cbe81fd1.1418372910.git.Andrew.Jackson@arm.com> <1418376671.18092.40.camel@perches.com> Message-ID: <548AB7EC.4020502@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 12/12/14 09:31, Joe Perches wrote: > On Fri, 2014-12-12 at 09:25 +0000, Andrew Jackson wrote: >> The devm_XXX allocation functions print a message on failure, >> so additional messages are not required. > [] >> diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c > [] >> @@ -345,26 +345,17 @@ static int dw_i2s_probe(struct platform_device *pdev) >> } >> >> dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); >> - if (!dw_i2s_dai) { >> - dev_err(&pdev->dev, "mem allocation failed for dai driver\n"); >> + if (!dw_i2s_dai) >> return -ENOMEM; >> - } > > ok. > >> dw_i2s_dai->ops = &dw_i2s_dai_ops; >> dw_i2s_dai->suspend = dw_i2s_suspend; >> dw_i2s_dai->resume = dw_i2s_resume; >> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - if (!res) { >> - dev_err(&pdev->dev, "no i2s resource defined\n"); >> - return -ENODEV; >> - } >> - > > Why delete this? Lars-Peter said that it was unnecessary: see . > >> dev->i2s_base = devm_ioremap_resource(&pdev->dev, res); >> - if (IS_ERR(dev->i2s_base)) { >> - dev_err(&pdev->dev, "ioremap fail for i2s_region\n"); >> + if (IS_ERR(dev->i2s_base)) >> return PTR_ERR(dev->i2s_base); >> - } > > or this? Ditto Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934727AbaLLJkh (ORCPT ); Fri, 12 Dec 2014 04:40:37 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:44706 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934054AbaLLJkf (ORCPT ); Fri, 12 Dec 2014 04:40:35 -0500 Message-ID: <548AB7EC.4020502@arm.com> Date: Fri, 12 Dec 2014 09:39:56 +0000 From: Andrew Jackson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Joe Perches CC: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Rajeev Kumar , Liviu Dudau , Lars-Peter Clausen , Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests References: <97f65b6037b9ac676f6ca7717a230a68cbe81fd1.1418372910.git.Andrew.Jackson@arm.com> <1418376671.18092.40.camel@perches.com> In-Reply-To: <1418376671.18092.40.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/14 09:31, Joe Perches wrote: > On Fri, 2014-12-12 at 09:25 +0000, Andrew Jackson wrote: >> The devm_XXX allocation functions print a message on failure, >> so additional messages are not required. > [] >> diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c > [] >> @@ -345,26 +345,17 @@ static int dw_i2s_probe(struct platform_device *pdev) >> } >> >> dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); >> - if (!dw_i2s_dai) { >> - dev_err(&pdev->dev, "mem allocation failed for dai driver\n"); >> + if (!dw_i2s_dai) >> return -ENOMEM; >> - } > > ok. > >> dw_i2s_dai->ops = &dw_i2s_dai_ops; >> dw_i2s_dai->suspend = dw_i2s_suspend; >> dw_i2s_dai->resume = dw_i2s_resume; >> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - if (!res) { >> - dev_err(&pdev->dev, "no i2s resource defined\n"); >> - return -ENODEV; >> - } >> - > > Why delete this? Lars-Peter said that it was unnecessary: see . > >> dev->i2s_base = devm_ioremap_resource(&pdev->dev, res); >> - if (IS_ERR(dev->i2s_base)) { >> - dev_err(&pdev->dev, "ioremap fail for i2s_region\n"); >> + if (IS_ERR(dev->i2s_base)) >> return PTR_ERR(dev->i2s_base); >> - } > > or this? Ditto Andrew