From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753922AbbIBPIC (ORCPT ); Wed, 2 Sep 2015 11:08:02 -0400 Received: from smtprelay0145.hostedemail.com ([216.40.44.145]:42614 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751763AbbIBPIA (ORCPT ); Wed, 2 Sep 2015 11:08:00 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2194:2198:2199:2200:2393:2551:2553:2559:2562:2828:2892:2899:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3873:3874:4321:4552:4605:5007:6261:8784:9108:10004:10400:10848:11026:11232:11473:11658:11914:12043:12050:12296:12438:12517:12519:12740:13069:13095:13161:13229:13255:13311:13357: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: wheel41_4590863343a35 X-Filterd-Recvd-Size: 2889 Message-ID: <1441206476.12163.44.camel@perches.com> Subject: Re: [PATCH 2/2] mmc: sdhci-pxav3: Print ret value on error from sdhci_add_host() fn From: Joe Perches To: Vaibhav Hiremath Cc: linux-mmc@vger.kernel.org, ulf.hansson@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Wed, 02 Sep 2015 08:07:56 -0700 In-Reply-To: <55E6F497.8080300@linaro.org> References: <1441135454-6902-1-git-send-email-vaibhav.hiremath@linaro.org> <1441135454-6902-3-git-send-email-vaibhav.hiremath@linaro.org> <1441139838.12163.5.camel@perches.com> <55E6F497.8080300@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 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 Wed, 2015-09-02 at 18:37 +0530, Vaibhav Hiremath wrote: > On Wednesday 02 September 2015 02:07 AM, Joe Perches wrote: > > On Wed, 2015-09-02 at 00:54 +0530, Vaibhav Hiremath wrote: > >> Return value would give clear information about the actual root-cause > >> of the failure. > >> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c > >> @@ -455,7 +455,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) > >> > >> ret = sdhci_add_host(host); > >> if (ret) { > >> - dev_err(&pdev->dev, "failed to add host\n"); > >> + dev_err(&pdev->dev, "failed to add host ret - %d\n", ret); > >> goto err_add_host; > >> } > > > > If this is really desirable, there are many other callers of > > sdhci_add_host with error messages just like this one. > > > How about this? If you are ok, I can change it and submit the patch > again. > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c [] > @@ -3176,8 +3176,11 @@ int sdhci_add_host(struct sdhci_host *host) > mmc->caps |= MMC_CAP_NEEDS_POLL; > > /* If there are external regulators, get them */ > - if (mmc_regulator_get_supply(mmc) == -EPROBE_DEFER) > + if (mmc_regulator_get_supply(mmc) == -EPROBE_DEFER) { > + pr_err("%s: regulator supply unavailable, deferring > probe. \n", > + mmc_hostname(mmc)); > return -EPROBE_DEFER; > + } (your email client has inappropriate line wrapping) The KERN_ here probably isn't right. Deferring isn't an error, at best it's a notification and perhaps should be at pr_notice/KERN_NOTICE I don't know how often or how many times this deferral can occur. Do you? If it's moderately common, that message should likely be ratelimited if it exists at all.