From patchwork Thu Apr 13 06:48:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9678763 X-Patchwork-Delegate: kvalo@adurom.com 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 8369A60326 for ; Thu, 13 Apr 2017 06:48:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7521D28651 for ; Thu, 13 Apr 2017 06:48:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 689B228654; Thu, 13 Apr 2017 06:48:33 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 E9A0128651 for ; Thu, 13 Apr 2017 06:48:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803AbdDMGsa (ORCPT ); Thu, 13 Apr 2017 02:48:30 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32992 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbdDMGs3 (ORCPT ); Thu, 13 Apr 2017 02:48:29 -0400 Received: by mail-pf0-f194.google.com with SMTP id c198so8870546pfc.0 for ; Wed, 12 Apr 2017 23:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=co/zhJdc/+uBdp69ajmOp9go5Vhjhk3SwuzH0kT9Vus=; b=ICSJNPyY6Wof5UZp6QukUGsdHu2qACE9uoDcL2EdhnKIhvqoahujT3ZuyNdznR3gvK KAemO5DduAp5LQ9pJrPaFK/QRq/jTEsizlYqOUJa6adW7Op8ROWZvvPhkZ6tpk6Sap1Z 3kzDP08Pcox2pnnfezIpapS93e4yv65P6huAd6UWzytT+qgXrK7mtvCn4n+358809Ijn VWrinhp2Ole3cVZyEodMbQsv+KCrZbqred99OvF1CWHF0PnIOAFIcIdfT1L0MoSeCD/5 3sUcdNVbcx5Rk2WKNCnT/VrHw/eIuMyXt5kN4ySwe53M8wABWJsuNUdRIkqxAzekmsWc rKEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=co/zhJdc/+uBdp69ajmOp9go5Vhjhk3SwuzH0kT9Vus=; b=VFAIqzgjcjvQqgoHub+ZUhWmNmDHraDVccYAquXHFFl3wfxQ9Oi0VmbPdJe0pC+zY1 ++I/ni/LD5WDXGOudZF/1wiyNFDFtDT3400dVmApecCzNcmJPWVjxR4LX6rV7EDa33Z1 BFfoG0syfvRSFD6wvJCPdNIUXPwFFBGzqYvlloG0Org4qvoNx5VO6IwFC4R2qY+0Fh5+ aPN6Vz004B1aYbQwN1wpHrep/NWN7vczMDOqoeE8h8It/h7usrvhSXmZ9Eqta6FRdQ0h pGwWJMtH9vzRmIFVGwOQCxLwy9OC+9Xgft7lb+SHQdv+rINaTYZoa1RRgf7rdwBev8m2 OJPw== X-Gm-Message-State: AN3rC/7bEYn6gJYQSU4q9QxFhnTYu1h4S7au8R/q5nL9k2a87/LM3b5a uAZfCBdDVdCOVPVS X-Received: by 10.84.237.1 with SMTP id s1mr2176373plk.145.1492066108201; Wed, 12 Apr 2017 23:48:28 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id 74sm40094544pfn.102.2017.04.12.23.48.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Apr 2017 23:48:27 -0700 (PDT) From: Xinming Hu To: Linux Wireless Cc: Kalle Valo , Brian Norris , Dmitry Torokhov , rajatja@google.com, Amitkumar Karwar , Cathy Luo , Xinming Hu Subject: [PATCH v4 1/4] mwifiex: remove unnecessary wakeup interrupt number sanity check Date: Thu, 13 Apr 2017 06:48:19 +0000 Message-Id: <1492066102-31251-1-git-send-email-huxinming820@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xinming Hu If wakeup interrupt handler is called, we know that the wakeup interrupt number is valid, there is no need to check it. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Reviewed-by: Dmitry Torokhov Reviewed-by: Brian Norris --- v2: modify description(Dimtry) v4: same as v2, v3 --- drivers/net/wireless/marvell/mwifiex/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index 0dfbac8..98fd491 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -1513,11 +1513,9 @@ static irqreturn_t mwifiex_irq_wakeup_handler(int irq, void *priv) { struct mwifiex_adapter *adapter = priv; - if (adapter->irq_wakeup >= 0) { - dev_dbg(adapter->dev, "%s: wake by wifi", __func__); - adapter->wake_by_wifi = true; - disable_irq_nosync(irq); - } + dev_dbg(adapter->dev, "%s: wake by wifi", __func__); + adapter->wake_by_wifi = true; + disable_irq_nosync(irq); /* Notify PM core we are wakeup source */ pm_wakeup_event(adapter->dev, 0);