From patchwork Fri Nov 24 16:24:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10074273 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 215376037F for ; Fri, 24 Nov 2017 16:27:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12D812A2C4 for ; Fri, 24 Nov 2017 16:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06D4A2A2CC; Fri, 24 Nov 2017 16:27:18 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 7D4692A2C4 for ; Fri, 24 Nov 2017 16:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753561AbdKXQ1D (ORCPT ); Fri, 24 Nov 2017 11:27:03 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:61697 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753806AbdKXQ0K (ORCPT ); Fri, 24 Nov 2017 11:26:10 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-11.nifty.com with ESMTP id vAOGP9W4007100; Sat, 25 Nov 2017 01:25:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com vAOGP9W4007100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1511540725; bh=Z9AmOyayl4c1S87/wp/oI9oZDCFOvZwprDL24YdjVf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jI8ytPDfb/8AfbJyoJKWhAw9jkVsg+hl937MMf4hqiheFApjsfgGr+LdcjmxprEdD 89eAQKggbFXPwHbQ+6+ibCZbU2jvou64AV9NKORRhhi/2ddw5iIcC+nJL+v9GHxxpn BuGP2d5bxGk4UiQCEnZpOpmxD7FyfGeG5rQvkUN1FTcjro/KqyoTf9y/uxCc6JLZI9 bThYOHiepNfeWwWjtY6728E9q+abPNSA6tl3gCL1IssReHt8J5N1FDiG3hJNAWaJLH 5qBNaly8wcyGe8RnoXz+TotYZARilAF8vy68Vhpd619g1B4Vdh5SkG3aQ8de8D47Aj FqC+Zd2EZSENQ== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-mmc@vger.kernel.org, Wolfram Sang Cc: Simon Horman , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH v2 18/22] mmc: tmio: remove useless TMIO_MASK_CMD handling in tmio_mmc_host_probe() Date: Sat, 25 Nov 2017 01:24:53 +0900 Message-Id: <1511540697-27387-19-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511540697-27387-1-git-send-email-yamada.masahiro@socionext.com> References: <1511540697-27387-1-git-send-email-yamada.masahiro@socionext.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 TMIO_MASK_CMD is properly enabled in tmio_mmc_start_command(). We have no reason to set it up in tmio_mmc_host_probe(). (If we really wanted to set it in the probe, we would have to do likewise when resuming.) Even worse, the following code is extremely confusing: _host->sdcard_irq_mask &= ~irq_mask; The logic is opposite between "->sdcard_irq_mask" and "irq_mask". The intention is not clear at a glance. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mmc/host/tmio_mmc_core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 345e379..f5b11b8 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1194,7 +1194,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, struct mmc_host *mmc = _host->mmc; struct resource *res_ctl; int ret; - u32 irq_mask = TMIO_MASK_CMD; tmio_mmc_of_parse(pdev, pdata); @@ -1289,8 +1288,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, _host->sdcard_irq_mask = sd_ctrl_read16_and_16_as_32(_host, CTL_IRQ_MASK); tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL); - _host->sdcard_irq_mask &= ~irq_mask; - if (_host->native_hotplug) tmio_mmc_enable_mmc_irqs(_host, TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);