From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jungseung Lee Subject: [PATCH RESEND] mmc: core: add error message when switching fails in mmc_select_hs() Date: Tue, 23 Aug 2016 18:50:07 +0900 Message-ID: <1471945807-6962-1-git-send-email-js07.lee@samsung.com> Return-path: Received: from mailout1.w1.samsung.com ([210.118.77.11]:53719 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753768AbcHWKDG (ORCPT ); Tue, 23 Aug 2016 06:03:06 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OCC0081TWOVI150@mailout1.w1.samsung.com> for linux-mmc@vger.kernel.org; Tue, 23 Aug 2016 10:50:55 +0100 (BST) Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Ulf Hansson , linux-mmc@vger.kernel.org Cc: Jungseung Lee The switch failure message in mmc_select_timing had been removed since that is invalid: commit 0400ed0a083a ("mmc: core: remove the invalid message in mmc_select_timing") Now, in the case when mmc_select_hs return error in mmc_select_timing, there is nothing to print failure message. Let's make for mmc_select_hs() print message itself in the failure case. Signed-off-by: Jungseung Lee --- drivers/mmc/core/mmc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index f2d185c..e07fcce 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1018,6 +1018,7 @@ static int mmc_switch_status(struct mmc_card *card) */ static int mmc_select_hs(struct mmc_card *card) { + struct mmc_host *host = card->host; int err; err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, @@ -1029,6 +1030,10 @@ static int mmc_select_hs(struct mmc_card *card) err = mmc_switch_status(card); } + if (err) + pr_err("%s: switch to high-speed failed, err:%d\n", + mmc_hostname(host), err); + return err; } @@ -1265,11 +1270,8 @@ static int mmc_select_hs400es(struct mmc_card *card) /* Switch card to HS mode */ err = mmc_select_hs(card); - if (err) { - pr_err("%s: switch to high-speed failed, err:%d\n", - mmc_hostname(host), err); + if (err) goto out_err; - } err = mmc_switch_status(card); if (err) -- 1.7.9.5