From: YueHaibing <yuehaibing@huawei.com>
To: <kvalo@codeaurora.org>, <arend.vanspriel@broadcom.com>
Cc: <linux-wireless@vger.kernel.org>,
<brcm80211-dev-list.pdl@broadcom.com>,
<brcm80211-dev-list@cypress.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
yuehaibing <yuehaibing@huawei.com>
Subject: [PATCH] brcmfmac: Remove always false 'idx < 0' statement
Date: Wed, 8 Jan 2020 21:57:48 +0800 [thread overview]
Message-ID: <20200108135748.46096-1-yuehaibing@huawei.com> (raw)
From: yuehaibing <yuehaibing@huawei.com>
idx is declared as u32, it will never less than 0.
Signed-off-by: yuehaibing <yuehaibing@huawei.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
index e3dd862..8bb4f1f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
@@ -365,7 +365,7 @@ brcmf_msgbuf_get_pktid(struct device *dev, struct brcmf_msgbuf_pktids *pktids,
struct brcmf_msgbuf_pktid *pktid;
struct sk_buff *skb;
- if (idx < 0 || idx >= pktids->array_size) {
+ if (idx >= pktids->array_size) {
brcmf_err("Invalid packet id %d (max %d)\n", idx,
pktids->array_size);
return NULL;
--
2.7.4
next reply other threads:[~2020-01-08 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 13:57 YueHaibing [this message]
2020-01-26 15:43 ` [PATCH] brcmfmac: Remove always false 'idx < 0' statement Kalle Valo
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=20200108135748.46096-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).