diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 16:15:59 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 16:19:15 +0200 |
commit | ce8a376e037f6f9cb005b7db58c2f00e0ae8959a (patch) | |
tree | 73e92783d975c1687523bb0dfffc66e4ecd90ee1 /src/queueing.h | |
parent | b4f98bf8a8a8f0e27b8eab8ca1d335fc8514d21f (diff) |
queueing: clean up worthless helper
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/queueing.h')
-rw-r--r-- | src/queueing.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/queueing.h b/src/queueing.h index 48607a1..385ca16 100644 --- a/src/queueing.h +++ b/src/queueing.h @@ -156,12 +156,6 @@ static inline bool queue_enqueue(struct crypt_queue *queue, struct list_head *no return true; } -static inline struct crypt_ctx *queue_dequeue_per_peer(struct crypt_queue *queue) -{ - struct list_head *node = queue_dequeue(queue); - return node ? list_entry(node, struct crypt_ctx, per_peer_node) : NULL; -} - static inline struct crypt_ctx *queue_dequeue_per_device(struct crypt_queue *queue) { struct list_head *node = queue_dequeue(queue); @@ -173,15 +167,10 @@ static inline struct crypt_ctx *queue_first_per_peer(struct crypt_queue *queue) return list_first_entry_or_null(&queue->queue, struct crypt_ctx, per_peer_node); } -static inline bool queue_enqueue_per_peer(struct crypt_queue *peer_queue, struct crypt_ctx *ctx) -{ - return queue_enqueue(peer_queue, &ctx->per_peer_node, MAX_QUEUED_PACKETS); -} - static inline bool queue_enqueue_per_device_and_peer(struct crypt_queue *device_queue, struct crypt_queue *peer_queue, struct crypt_ctx *ctx, struct workqueue_struct *wq, int *next_cpu) { int cpu; - if (unlikely(!queue_enqueue_per_peer(peer_queue, ctx))) + if (unlikely(!queue_enqueue(peer_queue, &ctx->per_peer_node, MAX_QUEUED_PACKETS))) return false; cpu = cpumask_next_online(next_cpu); queue_enqueue(device_queue, &ctx->per_device_node, 0); |