From patchwork Mon Mar 11 21:55:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 2251651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1E9BD3FC8F for ; Mon, 11 Mar 2013 21:59:13 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFAhM-0001nU-6j; Mon, 11 Mar 2013 21:56:00 +0000 Received: from void.printf.net ([89.145.121.20]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFAhI-0001mM-AF for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2013 21:55:57 +0000 Received: from c-76-24-28-220.hsd1.ma.comcast.net ([76.24.28.220] helo=octavius.laptop.org) by void.printf.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1UFAh4-0002ZS-6d; Mon, 11 Mar 2013 21:55:42 +0000 From: Chris Ball To: Arnd Bergmann Subject: Re: Regulator API ignored return values References: <201303112043.53334.arnd@arndb.de> Date: Mon, 11 Mar 2013 17:55:39 -0400 In-Reply-To: <201303112043.53334.arnd@arndb.de> (Arnd Bergmann's message of "Mon, 11 Mar 2013 20:43:53 +0000") Message-ID: <87a9q9iotg.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130311_175556_528143_676C9D80 X-CRM114-Status: GOOD ( 12.77 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [89.145.121.20 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Jingoo Han , Axel Lin , Stephen Warren , Dmitry Torokhov , Linus Walleij , Mark Brown , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Balbi , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi, On Mon, Mar 11 2013, Arnd Bergmann wrote: > ==> build/dove_defconfig/faillog <== > /git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host': > /git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring > return value of 'regulator_enable', declared with attribute > warn_unused_result [-Wunused-result] Thanks, this looks like the right fix to me: Subject: [PATCH] mmc: sdhci: Don't ignore regulator_enable() return value Fixes: /git/arm-soc/drivers/mmc/host/sdhci.c: In function 'sdhci_add_host': /git/arm-soc/drivers/mmc/host/sdhci.c:2910:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result] Reported-by: Arnd Bergmann Signed-off-by: Chris Ball --- drivers/mmc/host/sdhci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 51bbba4..fbf0b93 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2907,12 +2907,17 @@ int sdhci_add_host(struct sdhci_host *host) host->vqmmc = NULL; } } else { - regulator_enable(host->vqmmc); + ret = regulator_enable(host->vqmmc); if (!regulator_is_supported_voltage(host->vqmmc, 1700000, 1950000)) caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50); + if (ret) { + pr_warn("%s: Failed to enable vqmmc regulator: %d\n", + mmc_hostname(mmc), ret); + host->vqmmc = NULL; + } } if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V)