From: manikanta.pubbisetty@gmail.com To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com> Subject: [PATCH] ath10k: consolidate if statements in ath10k_wmi_event_mgmt_rx Date: Tue, 20 Oct 2015 11:32:46 +0530 [thread overview] Message-ID: <1445320966-17024-1-git-send-email-manikanta.pubbisetty@gmail.com> (raw) From: Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com> This patch combines several if statements into a single if condition in WMI management rx handler. Found during code review. Signed-off-by: Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com> --- drivers/net/wireless/ath/ath10k/wmi.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 6e7d7a7..a9d42ef 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2200,22 +2200,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) ath10k_dbg(ar, ATH10K_DBG_MGMT, "event mgmt rx status %08x\n", rx_status); - if (test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags)) { - dev_kfree_skb(skb); - return 0; - } - - if (rx_status & WMI_RX_STATUS_ERR_DECRYPT) { - dev_kfree_skb(skb); - return 0; - } - - if (rx_status & WMI_RX_STATUS_ERR_KEY_CACHE_MISS) { - dev_kfree_skb(skb); - return 0; - } - - if (rx_status & WMI_RX_STATUS_ERR_CRC) { + if ((test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags)) || + (rx_stats & (WMI_RX_STATUS_ERR_DECRYPT | + WMI_RX_STATUS_ERR_KEY_CACHE_MISS | WMI_RX_STATUS_ERR_CRC))) { dev_kfree_skb(skb); return 0; } -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: manikanta.pubbisetty@gmail.com To: ath10k@lists.infradead.org Cc: Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com>, linux-wireless@vger.kernel.org Subject: [PATCH] ath10k: consolidate if statements in ath10k_wmi_event_mgmt_rx Date: Tue, 20 Oct 2015 11:32:46 +0530 [thread overview] Message-ID: <1445320966-17024-1-git-send-email-manikanta.pubbisetty@gmail.com> (raw) From: Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com> This patch combines several if statements into a single if condition in WMI management rx handler. Found during code review. Signed-off-by: Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com> --- drivers/net/wireless/ath/ath10k/wmi.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 6e7d7a7..a9d42ef 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2200,22 +2200,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) ath10k_dbg(ar, ATH10K_DBG_MGMT, "event mgmt rx status %08x\n", rx_status); - if (test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags)) { - dev_kfree_skb(skb); - return 0; - } - - if (rx_status & WMI_RX_STATUS_ERR_DECRYPT) { - dev_kfree_skb(skb); - return 0; - } - - if (rx_status & WMI_RX_STATUS_ERR_KEY_CACHE_MISS) { - dev_kfree_skb(skb); - return 0; - } - - if (rx_status & WMI_RX_STATUS_ERR_CRC) { + if ((test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags)) || + (rx_stats & (WMI_RX_STATUS_ERR_DECRYPT | + WMI_RX_STATUS_ERR_KEY_CACHE_MISS | WMI_RX_STATUS_ERR_CRC))) { dev_kfree_skb(skb); return 0; } -- 1.9.1 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next reply other threads:[~2015-10-20 18:32 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-20 6:02 manikanta.pubbisetty [this message] 2015-10-20 6:02 ` [PATCH] ath10k: consolidate if statements in ath10k_wmi_event_mgmt_rx manikanta.pubbisetty 2015-10-20 18:59 ` kbuild test robot 2015-10-20 18:59 ` kbuild test robot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1445320966-17024-1-git-send-email-manikanta.pubbisetty@gmail.com \ --to=manikanta.pubbisetty@gmail.com \ --cc=ath10k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.