From patchwork Thu Sep 26 19:22:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Grundler X-Patchwork-Id: 2951091 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0CBE29F288 for ; Thu, 26 Sep 2013 19:25:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF199202F7 for ; Thu, 26 Sep 2013 19:25:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2C33202C8 for ; Thu, 26 Sep 2013 19:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998Ab3IZTZI (ORCPT ); Thu, 26 Sep 2013 15:25:08 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:39280 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754205Ab3IZTXj (ORCPT ); Thu, 26 Sep 2013 15:23:39 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so1563107pdj.8 for ; Thu, 26 Sep 2013 12:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=47WsE64witV+fWZEZBJ0hnm96JSxZmiM+6rjdUrtnmg=; b=B6yNxFiKT2bXbZdPR35M2Cfms6ADxBLFmzlSMQDE4q2Lx1Vle/PK7PZ0SI/xCJiuVY /VGWydkHflQ/poOjQ6ygWicHLeUlS/KOlB3AzfDLDr/gVwJAPUQUGOC1uGBMDPS5UrmH LLAVESdZ3QCWbbuZK8+y8s523RpsBb6TQUDwI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=47WsE64witV+fWZEZBJ0hnm96JSxZmiM+6rjdUrtnmg=; b=XaxM7gMtkFVc7Afsgf7oHbYVY3hDbRH5sgl9hPelq0lSSdlaHVXC9kp5BmKV0CXpC+ GorMz1kihsiZpQy3lFIF+Equ/xuWJV+kDE2HC9smwtTFdttMBk1TfjotxhOQNzqZ5lh4 Yht4iSF4KYSITd+0QJ7edKiWACDz1iwrQD5qluyhPsvQ+lcK7qUedqegYkSnWH3YEth1 wJReSJ5Vdvpkr1DRdNG+bsPP9grUKHvflnhAp935TeWfH3Hiu8u6svgo76z0WlueMSuU K78jgecYo9Q3yypbUAO1QwJwZmNtPHnFqCEEtAasPFb2ojRiSSzWw67gvyuLSX0wrYy/ lcZg== X-Gm-Message-State: ALoCoQkSe+X7qgZJVEumtuZS2ou1Bj3/38hyHKw0fq0wSwm9LKhZRud5Mv+NwxBQOxVp+W+KADdA X-Received: by 10.66.162.136 with SMTP id ya8mr7154401pab.110.1380223419299; Thu, 26 Sep 2013 12:23:39 -0700 (PDT) Received: from firesword.mtv.corp.google.com (firesword.mtv.corp.google.com [172.22.73.90]) by mx.google.com with ESMTPSA id ar1sm3900253pbc.34.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 12:23:38 -0700 (PDT) From: Grant Grundler To: Chris Ball , Ulf Hansson , Seungwon Jeon Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler Subject: [PATCH 2/7] mmc: core: rename local var err to saved_err Date: Thu, 26 Sep 2013 12:22:55 -0700 Message-Id: <1380223380-22451-3-git-send-email-grundler@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1380223380-22451-1-git-send-email-grundler@chromium.org> References: <1380223380-22451-1-git-send-email-grundler@chromium.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Just making it more obvious 'err' refers to the status of the in flight request (aka saved_areq) and not the new async request we might start. Signed-off-by: Grant Grundler --- drivers/mmc/core/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index e5a40ee..675139e 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -527,7 +527,7 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, struct mmc_async_req *mmc_start_req(struct mmc_host *host, struct mmc_async_req *areq, int *error) { - int err = 0; + int saved_err = 0; int start_err = 0; struct mmc_async_req *saved_areq = host->areq; @@ -536,10 +536,10 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, mmc_pre_req(host, areq->mrq, !saved_areq); if (saved_areq) { - err = mmc_wait_for_data_req_done(host, saved_areq->mrq, areq); - if (err == MMC_BLK_NEW_REQUEST) { + saved_err = mmc_wait_for_data_req_done(host, saved_areq->mrq, areq); + if (saved_err == MMC_BLK_NEW_REQUEST) { if (error) - *error = err; + *error = saved_err; /* * The previous request was not completed, * nothing to return @@ -556,23 +556,23 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, mmc_start_bkops(host->card, true); } - if (!err && areq) + if (!saved_err && areq) start_err = __mmc_start_data_req(host, areq->mrq); if (saved_areq) mmc_post_req(host, saved_areq->mrq, 0); /* Cancel a prepared request if it was not started. */ - if ((err || start_err) && areq) + if ((saved_err || start_err) && areq) mmc_post_req(host, areq->mrq, -EINVAL); - if (err) + if (saved_err) host->areq = NULL; else host->areq = areq; if (error) - *error = err; + *error = saved_err; return saved_areq; } EXPORT_SYMBOL(mmc_start_req);