From patchwork Tue Feb 14 20:07:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9572719 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 53ADE601E7 for ; Tue, 14 Feb 2017 20:08:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F81426E4D for ; Tue, 14 Feb 2017 20:08:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 446BF2840E; Tue, 14 Feb 2017 20:08:09 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 D415726E4D for ; Tue, 14 Feb 2017 20:08:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752992AbdBNUIH (ORCPT ); Tue, 14 Feb 2017 15:08:07 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36479 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751786AbdBNUIE (ORCPT ); Tue, 14 Feb 2017 15:08:04 -0500 Received: by mail-wr0-f193.google.com with SMTP id k90so28775859wrc.3 for ; Tue, 14 Feb 2017 12:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Rex2PLzkmeUyo154ZCTByAMKtUmObaHTJf0FFck/NS4=; b=IjqnHOIDDGFDbbDspRsjizbvk7Dv5adfy06dKuce0+jvdvEyzBBESXK0j1ioqTORS6 JTkoaT2pRnywXFGBTGyTBlu9tp3px1jHCrPzh8a4gUsmz7TGOTbkkUZ5ItSYUPNkLxlr H0sGuiPKWM1UMy/hKa+dK/F3dVwnMtbzIeav5v1hAhswjgCNz/7gQoD6E77PGw7EX5eD fo9PLraAwxTUMkwTrvIZEHy/JDxLS8RvLfjj/haqfs7i90Te2lYmS6OUSQOzsRYLCC/Q ngHje+eLlyXtrlqZeKKYXR16yyiYxc+pn8xbXc/yImYj9rKWj+Yy0fnCgj1bZlGZpvda u3ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Rex2PLzkmeUyo154ZCTByAMKtUmObaHTJf0FFck/NS4=; b=MRw9gnDpkyFB3w52jiRKLFFHzjjSCyqkw+/J2+uGBzooQDfd/uqS+n+x738y8mCyVE ybYXf5xgl6LZ3dlvosNUlpb6aj4wlgCU6707mcnWNDTxo15iZjJ3o/NIQjBaWEnA/9ZU PdrylI+rlyhuvNo8kEo32WpB3Ji3Fr7HVCAstQiSXBHvBL9WIQ+4XK2tiAnt/iJDd1bY OM6KqxfaI6HmD5vCBqt6Qo1UzkBoeEB24d1NDgtSB2+rD+8ecE1MooH1SuhxeDraMFHH aH6ECWpbF1PoU7NavQLB1DWIyJbLlgMYEUg9AO2grL8P+Zv81zmYRnTk1UPReeex4AK5 HrmQ== X-Gm-Message-State: AMke39kTk9/PqXrRSpE+SMPX7SxUIZPT84l04oGFlQqxzbQEqFY0SIzG3XkYGI9t08xtgA== X-Received: by 10.223.134.151 with SMTP id 23mr30483010wrx.0.1487102872960; Tue, 14 Feb 2017 12:07:52 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:9533:a20:55f1:fb4b? (p200300C6EBDC400095330A2055F1FB4B.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:9533:a20:55f1:fb4b]) by smtp.googlemail.com with ESMTPSA id 40sm2066893wry.22.2017.02.14.12.07.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 12:07:52 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 17/18] mmc: meson-gx: remove member mrq from struct meson_host To: Ulf Hansson , Kevin Hilman References: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> Cc: Carlo Caione , "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org Message-ID: <66202cf4-fed6-a6ac-558f-c91979980629@gmail.com> Date: Tue, 14 Feb 2017 21:07:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> 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 Struct mmc_command includes a reference to the related mmc_request. Therefore we don't have to store mrq separately in struct meson_host. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- drivers/mmc/host/meson-gx-mmc.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 6721aee2..08ff29be 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -123,7 +123,6 @@ struct meson_host { struct device *dev; struct mmc_host *mmc; - struct mmc_request *mrq; struct mmc_command *cmd; spinlock_t lock; @@ -407,9 +406,6 @@ static void meson_mmc_request_done(struct mmc_host *mmc, { struct meson_host *host = mmc_priv(mmc); - WARN_ON(host->mrq != mrq); - - host->mrq = NULL; host->cmd = NULL; mmc_request_done(host->mmc, mrq); } @@ -506,11 +502,6 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd) static void meson_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) { - struct meson_host *host = mmc_priv(mmc); - - WARN_ON(host->mrq != NULL); - - host->mrq = mrq; meson_mmc_start_cmd(mmc, mrq->cmd); } @@ -535,7 +526,6 @@ static void meson_mmc_read_resp(struct mmc_host *mmc, struct mmc_command *cmd) static irqreturn_t meson_mmc_irq(int irq, void *dev_id) { struct meson_host *host = dev_id; - struct mmc_request *mrq; struct mmc_command *cmd; u32 irq_en, status, raw_status; irqreturn_t ret = IRQ_HANDLED; @@ -545,11 +535,6 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) cmd = host->cmd; - mrq = host->mrq; - - if (WARN_ON(!mrq)) - return IRQ_NONE; - if (WARN_ON(!cmd)) return IRQ_NONE; @@ -598,7 +583,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) else { dev_warn(host->dev, "Unknown IRQ! status=0x%04x: MMC CMD%u arg=0x%08x flags=0x%08x stop=%d\n", status, cmd->opcode, cmd->arg, - cmd->flags, mrq->stop ? 1 : 0); + cmd->flags, cmd->mrq->stop ? 1 : 0); if (cmd->data) { struct mmc_data *data = cmd->data; @@ -623,14 +608,10 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) { struct meson_host *host = dev_id; - struct mmc_request *mrq = host->mrq; struct mmc_command *cmd = host->cmd; struct mmc_data *data; unsigned int xfer_bytes; - if (WARN_ON(!mrq)) - return IRQ_NONE; - if (WARN_ON(!cmd)) return IRQ_NONE; @@ -647,7 +628,7 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) if (mmc_op_multi(cmd->opcode)) meson_mmc_start_cmd(host->mmc, data->stop); else - meson_mmc_request_done(host->mmc, mrq); + meson_mmc_request_done(host->mmc, cmd->mrq); return IRQ_HANDLED; }