From: xiaolinkui Date: Thu, 22 Aug 2019 06:58:16 +0000 (+0800) Subject: net: use unlikely for dql_avail case X-Git-Tag: v5.15~5506^2~158 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3acd33d840d3ea3e1233d234605c85cbbf26054;p=platform%2Fkernel%2Flinux-starfive.git net: use unlikely for dql_avail case This is an unlikely case, use unlikely() on it seems logical. Signed-off-by: xiaolinkui Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 55ac223553f8..b5d28dadf964 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3272,7 +3272,7 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue, */ smp_mb(); - if (dql_avail(&dev_queue->dql) < 0) + if (unlikely(dql_avail(&dev_queue->dql) < 0)) return; if (test_and_clear_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state))