From patchwork Thu Sep 26 19:22:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Grundler X-Patchwork-Id: 2951071 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 53354BFF0B for ; Thu, 26 Sep 2013 19:25:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CB55202F9 for ; Thu, 26 Sep 2013 19:25:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 326DC202C8 for ; Thu, 26 Sep 2013 19:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754539Ab3IZTZK (ORCPT ); Thu, 26 Sep 2013 15:25:10 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:38684 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753049Ab3IZTXf (ORCPT ); Thu, 26 Sep 2013 15:23:35 -0400 Received: by mail-pb0-f49.google.com with SMTP id xb4so1540215pbc.36 for ; Thu, 26 Sep 2013 12:23:35 -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=LstokfBrrO2KOOfLogc2upet7E64vRB56swxFAEjH9Y=; b=TpYxJhvSB9cVufVAKGuKNnxzQDr3YLBeWFlq+IoExgORfRd4U36Xe2qvnyMlAPzmr2 FxVRsMe+tvoUx+G1hzyvGW2UA53BqpiM53LWCYL8Dwj4GaZPJ46SOdnt04XRsWJme5G9 LG2qhgqTB9g7pL6KG8oLfEjhDUF1tFCpH63HM= 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=LstokfBrrO2KOOfLogc2upet7E64vRB56swxFAEjH9Y=; b=lsEbMY08ELpsj+pkd2cHDNQv1RZYxNqocTLCrsFutGSoW5GyJURa3RWjM95di6gYqh VMtOgi3xzboquYotj3N6ONTW83D8nBtxkJqFsB5oRJ29GQZntog7OMYL/fPPzMmOpM0f MLJiY+CFdYlh+zkqzqCU/HfELaGskaq+GgFxTh4ZYhOg0IO36Fgm/DQeXOFGbDEbnfgL NDF7gf6WMzSbMpHJoMDIwvRetPX/8Lr0tpsroXSWrVQqGmiXdbRmJC5nZyynTrej+hRB lrd1SOAsG/t3u+eeih6jb92kvalY8TTDD5KAg2AAs/VnReg4mJaJSMAAs59QLFYxfn30 AndQ== X-Gm-Message-State: ALoCoQlimD1gmxLd8FDEbaG9Fjyn1/5iU/sLljoOki9BDc5lWzkmBdNgIixbjkz1e66IhRcaZuJ8 X-Received: by 10.68.113.130 with SMTP id iy2mr3146758pbb.2.1380223415186; Thu, 26 Sep 2013 12:23:35 -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:34 -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 1/7] mmc: core: rename "data" to saved_areq Date: Thu, 26 Sep 2013 12:22:54 -0700 Message-Id: <1380223380-22451-2-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 Replace "data" with a more descriptive name. Using a local variable (ie a register) makes explicit what the compiler is doing under the covers anyway: the function is dereferencing one pointer value the whole time. Signed-off-by: Grant Grundler --- drivers/mmc/core/core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 006ead2..e5a40ee 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -529,14 +529,14 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, { int err = 0; int start_err = 0; - struct mmc_async_req *data = host->areq; + struct mmc_async_req *saved_areq = host->areq; /* Prepare a new request */ if (areq) - mmc_pre_req(host, areq->mrq, !host->areq); + mmc_pre_req(host, areq->mrq, !saved_areq); - if (host->areq) { - err = mmc_wait_for_data_req_done(host, host->areq->mrq, areq); + if (saved_areq) { + err = mmc_wait_for_data_req_done(host, saved_areq->mrq, areq); if (err == MMC_BLK_NEW_REQUEST) { if (error) *error = err; @@ -550,17 +550,17 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, * Check BKOPS urgency for each R1 response */ if (host->card && mmc_card_mmc(host->card) && - ((mmc_resp_type(host->areq->mrq->cmd) == MMC_RSP_R1) || - (mmc_resp_type(host->areq->mrq->cmd) == MMC_RSP_R1B)) && - (host->areq->mrq->cmd->resp[0] & R1_EXCEPTION_EVENT)) + ((mmc_resp_type(saved_areq->mrq->cmd) == MMC_RSP_R1) || + (mmc_resp_type(saved_areq->mrq->cmd) == MMC_RSP_R1B)) && + (saved_areq->mrq->cmd->resp[0] & R1_EXCEPTION_EVENT)) mmc_start_bkops(host->card, true); } if (!err && areq) start_err = __mmc_start_data_req(host, areq->mrq); - if (host->areq) - mmc_post_req(host, host->areq->mrq, 0); + 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) @@ -573,7 +573,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, if (error) *error = err; - return data; + return saved_areq; } EXPORT_SYMBOL(mmc_start_req);