Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934869AbaLLKGT (ORCPT ); Fri, 12 Dec 2014 05:06:19 -0500 Received: from smtprelay0090.hostedemail.com ([216.40.44.90]:49271 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934677AbaLLKGR (ORCPT ); Fri, 12 Dec 2014 05:06:17 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2525:2553:2560:2563:2682:2685:2828:2859:2896:2899:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3868:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6119:6261:6742:9025:9388:9855:10004:10049:10400:10848:11026:11232:11658:11914:12043:12296:12438:12517:12519:12555:12740:12776:13019:13069:13095:13141:13161:13229:13230:13311:13357:14094:14106:14107:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: crow95_70b086a259e08 X-Filterd-Recvd-Size: 3146 Message-ID: <1418378772.18092.42.camel@perches.com> Subject: Re: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests From: Joe Perches To: Andrew Jackson 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" Date: Fri, 12 Dec 2014 02:06:12 -0800 In-Reply-To: <548AB7EC.4020502@arm.com> References: <97f65b6037b9ac676f6ca7717a230a68cbe81fd1.1418372910.git.Andrew.Jackson@arm.com> <1418376671.18092.40.camel@perches.com> <548AB7EC.4020502@arm.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2014-12-12 at 09:39 +0000, Andrew Jackson wrote: > 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 OK, but your commit message doesn't match the changes. These messages are redundant not what most consider debugging messages (ie: emitted at KERN_DEBUG). The 2nd one isn't a devm_ function and the last one isn't an allocation. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/