From patchwork Tue Jul 12 14:08:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9225381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E8FBA604DB for ; Tue, 12 Jul 2016 14:09:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAAD627BF9 for ; Tue, 12 Jul 2016 14:09:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF7E227C39; Tue, 12 Jul 2016 14:09:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA10227BF9 for ; Tue, 12 Jul 2016 14:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754424AbcGLOJa (ORCPT ); Tue, 12 Jul 2016 10:09:30 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:22603 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbcGLOJ2 (ORCPT ); Tue, 12 Jul 2016 10:09:28 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OA700AY9GNPJQB0@mailout3.w1.samsung.com>; Tue, 12 Jul 2016 15:09:25 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-b2-5784fa15303b Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id E7.EA.04866.51AF4875; Tue, 12 Jul 2016 15:09:25 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OA7002OZGNJTT50@eusync3.samsung.com>; Tue, 12 Jul 2016 15:09:25 +0100 (BST) From: Krzysztof Kozlowski To: Ulf Hansson , Jaehoon Chung , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 2/2] mmc: dw_mmc: Print proper voltage on error Date: Tue, 12 Jul 2016 16:08:22 +0200 Message-id: <1468332502-28016-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1468332502-28016-1-git-send-email-k.kozlowski@samsung.com> References: <1468332502-28016-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkluLIzCtJLcpLzFFi42I5/e/4VV3RXy3hBucv8FhsnLGe1eLGrzZW i9cvDC0u75rDZnHkfz+jxfG14Q5sHneu7WHz6NuyitHj8ya5AOYoLpuU1JzMstQifbsEroy/ ix6wFbxlr1hyKryBcQNbFyMnh4SAicTSmzNYIGwxiQv31gPFuTiEBJYySuxYtJMdwmlkknh0 spERpIpNwFhi8/IlYFUiAr2MEp0Td4IlmAUyJTr3zmUHsYUF7CWmnfkMNpZFQFWiY8U0oBoO Dl4Bd4mTl3whtslJnDw2mRXE5hTwkPj88iRYiRBQyeFJ5hMYeRcwMqxiFE0tTS4oTkrPNdIr TswtLs1L10vOz93ECAmYrzsYlx6zOsQowMGoxMPbcbI5XIg1say4MvcQowQHs5IIb8a3lnAh 3pTEyqrUovz4otKc1OJDjNIcLErivDN3vQ8REkhPLEnNTk0tSC2CyTJxcEo1MApISH69fOJa gWVewvx7h9RPcsjysYt1nljt0L1yDsdD7osfxQPuVfdrbTik2Pkz/cfclouBMY7/N9clGvE9 OiIUpLVLQ/+oW0ekudMxkR/LBDd759xY96aFubzl4/9D6jd9z8zXNT0lKfAi/45g1oTQtztE lxhPWfTCqX7fUVdJ/e7Y6/8DjyqxFGckGmoxFxUnAgAlnW12FAIAAA== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The commit 97f659a2e972 ("mmc: dw_mmc: prevent to set the wrong value") reordered the code so the 'uhs' variable used in mmc_regulator_set_vqmmc() error message is always 0 at that time thus always printing 3.3 voltage. Instead use value obtained from ios in printed error message. Signed-off-by: Krzysztof Kozlowski --- drivers/mmc/host/dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index c2a128628b31..7de561065003 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1416,8 +1416,8 @@ static int dw_mci_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios) ret = mmc_regulator_set_vqmmc(mmc, ios); if (ret) { dev_err(&mmc->class_dev, - "Regulator set error %d - %s V\n", - ret, uhs & v18 ? "1.8" : "3.3"); + "Regulator set error %d - %s\n", + ret, mmc_voltage_to_str(ios)); return ret; }