mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 07:31:45 +00:00
cw1200: use time_is_after_jiffies() instead of open coding it
Use the helper function time_is_{before,after}_jiffies() to improve code readability. Signed-off-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/1646018060-61275-1-git-send-email-wangqing@vivo.com
This commit is contained in:
parent
56e4e4538e
commit
8cbc3d51b4
@ -8,6 +8,7 @@
|
||||
|
||||
#include <net/mac80211.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include "queue.h"
|
||||
#include "cw1200.h"
|
||||
#include "debug.h"
|
||||
@ -94,7 +95,7 @@ static void __cw1200_queue_gc(struct cw1200_queue *queue,
|
||||
bool wakeup_stats = false;
|
||||
|
||||
list_for_each_entry_safe(item, tmp, &queue->queue, head) {
|
||||
if (jiffies - item->queue_timestamp < queue->ttl)
|
||||
if (time_is_after_jiffies(item->queue_timestamp + queue->ttl))
|
||||
break;
|
||||
--queue->num_queued;
|
||||
--queue->link_map_cache[item->txpriv.link_id];
|
||||
|
Loading…
Reference in New Issue
Block a user