summaryrefslogtreecommitdiffhomepage
path: root/src/queueing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/queueing.c')
-rw-r--r--src/queueing.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/queueing.c b/src/queueing.c
index c8394fc..9ec6588 100644
--- a/src/queueing.c
+++ b/src/queueing.c
@@ -5,22 +5,25 @@
#include "queueing.h"
-struct multicore_worker __percpu *packet_alloc_percpu_multicore_worker(work_func_t function, void *ptr)
+struct multicore_worker __percpu *
+packet_alloc_percpu_multicore_worker(work_func_t function, void *ptr)
{
int cpu;
- struct multicore_worker __percpu *worker = alloc_percpu(struct multicore_worker);
+ struct multicore_worker __percpu *worker =
+ alloc_percpu(struct multicore_worker);
if (!worker)
return NULL;
- for_each_possible_cpu(cpu) {
+ for_each_possible_cpu (cpu) {
per_cpu_ptr(worker, cpu)->ptr = ptr;
INIT_WORK(&per_cpu_ptr(worker, cpu)->work, function);
}
return worker;
}
-int packet_queue_init(struct crypt_queue *queue, work_func_t function, bool multicore, unsigned int len)
+int packet_queue_init(struct crypt_queue *queue, work_func_t function,
+ bool multicore, unsigned int len)
{
int ret;
@@ -30,7 +33,8 @@ int packet_queue_init(struct crypt_queue *queue, work_func_t function, bool mult
return ret;
if (function) {
if (multicore) {
- queue->worker = packet_alloc_percpu_multicore_worker(function, queue);
+ queue->worker = packet_alloc_percpu_multicore_worker(
+ function, queue);
if (!queue->worker)
return -ENOMEM;
} else