Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b44f486 authored by Christoph Lameter's avatar Christoph Lameter Committed by Tejun Heo
Browse files

this_cpu: Use this_cpu_ptr in crypto subsystem



Just a slight optimization that removes one array lookup.
The processor number is needed for other things as well so the
get/put_cpu cannot be removed.

Acked-by: default avatarTejun Heo <tj@kernel.org>
Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: default avatarChristoph Lameter <cl@linux-foundation.org>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 7a9e02d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue,
	struct cryptd_cpu_queue *cpu_queue;
	struct cryptd_cpu_queue *cpu_queue;


	cpu = get_cpu();
	cpu = get_cpu();
	cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu);
	cpu_queue = this_cpu_ptr(queue->cpu_queue);
	err = crypto_enqueue_request(&cpu_queue->queue, request);
	err = crypto_enqueue_request(&cpu_queue->queue, request);
	queue_work_on(cpu, kcrypto_wq, &cpu_queue->work);
	queue_work_on(cpu, kcrypto_wq, &cpu_queue->work);
	put_cpu();
	put_cpu();