From patchwork Fri Apr 7 10:51:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9669267 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 3A195602B3 for ; Fri, 7 Apr 2017 10:52:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B9A2262F2 for ; Fri, 7 Apr 2017 10:52:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 201F526E91; Fri, 7 Apr 2017 10:52:02 +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 9E273262F2 for ; Fri, 7 Apr 2017 10:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753281AbdDGKwA (ORCPT ); Fri, 7 Apr 2017 06:52:00 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35758 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbdDGKv6 (ORCPT ); Fri, 7 Apr 2017 06:51:58 -0400 Received: by mail-pg0-f67.google.com with SMTP id g2so14733667pge.2 for ; Fri, 07 Apr 2017 03:51:58 -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=1G1b8+rhY2Ej06NaI9LjkIPODxCWrh+FKt7fmkyHUBM=; b=Y08BMqwc9KpHKxR4h7gRafvuUz5nkF6S/+AV0LVG//4WFPRbJWrXAQwT+i8EsPr/wr lQ+ZLbydYhatU78XgfH+xDm2Gr7m62MW4UE/RQJky3Sytz1Umvqc4eMZmgHDAXZSOtc4 b3EvtJXrfAZzflHdYhdOQMJm8hMyyrpF9HATSCV9wVe0tMCnI0dlHjKJ8wUh209qNoXO ry3mx9xk580g9mX4uiAj6zJAooSmZMOLJMM7GcQA/TO1VJSNhWIl0AAckgX1A9TzOwsA SdP9poVgZb41UZYSfDic2jAqrxo5Y8K+Ib7HvBVQDQXGYOe953g4GS3dbhLCAj8VjgyY 288g== 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=1G1b8+rhY2Ej06NaI9LjkIPODxCWrh+FKt7fmkyHUBM=; b=JGOeYKOobqB/YN02iAVXFi8RQEkXE+I65ijzyJToG6ch13Nfep2oMzs3Wm6iZVNlXF 4Z6CxDH7cUm2pSVjyImU153Ig7YvJ4m3cyI35v22ZaemqME/pEpdq6hm74wpPQBEPyZZ vM6m+8Z40eIFcnDehgCPkdQY3QMfJxsiiLaqNjC6qbcZzgDQBJ/kU+0U81U2N28YbNDa NU9FWePZp+cp7hYCiIGOpdKDSKzCsFgfo0a6PF5zuk8tgG0foSbIAE9CgfyVNcJDNuER 11v0dIrnvqlC/rDsNaFkR8NDQdou/hN7TeV8wCokUj6K8p4h8SOIbscsTRuLV+2ybDRe m0WA== X-Gm-Message-State: AFeK/H1Dzol1inVwVpymI3icYnS3lxSvJZbCCH1RBDd04wX0/jNFbMP3Cu4zBjzredbIUQ== X-Received: by 10.98.14.93 with SMTP id w90mr19420295pfi.59.1491562318024; Fri, 07 Apr 2017 03:51:58 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id u129sm8931943pfu.48.2017.04.07.03.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Apr 2017 03:51:57 -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 v2 1/4] mwifiex: remove unnecessary wakeup interrupt number sanity check Date: Fri, 7 Apr 2017 10:51:22 +0000 Message-Id: <1491562285-29818-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) --- 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);