Commit 8012ec4a authored by Juhee Kang's avatar Juhee Kang Committed by Kalle Valo

wifi: brcmutil: use helper function pktq_empty() instead of open code

pktq_empty was added in commit 5b435de0 ("net: wireless: add brcm80211
drivers") but it is currently not being utilized in some areas. This commit
replaces the open code with the pktq_empty() function.
Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230527114954.3281-2-claudiajkang@gmail.com
parent 3e450386
......@@ -186,7 +186,7 @@ struct sk_buff *brcmu_pktq_peek_tail(struct pktq *pq, int *prec_out)
{
int prec;
if (pq->len == 0)
if (pktq_empty(pq))
return NULL;
for (prec = 0; prec < pq->hi_prec; prec++)
......@@ -223,7 +223,7 @@ struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp,
struct sk_buff *p;
int prec;
if (pq->len == 0)
if (pktq_empty(pq))
return NULL;
while ((prec = pq->hi_prec) > 0 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment