summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux-foundation.org>2009-10-03 19:48:23 +0900
committerTejun Heo <tj@kernel.org>2009-10-03 19:48:23 +0900
commit7ba0acd50f8d9750cba720f2cd000f751fd92fd9 (patch)
tree2f028aaa3d49fe182dbf578e4eaf9ed71c3a4b2d
parent02c423c93eecff41ff116812908375c8587be685 (diff)
downloadlinux-crypto-7ba0acd50f8d9750cba720f2cd000f751fd92fd9.tar.gz
linux-crypto-7ba0acd50f8d9750cba720f2cd000f751fd92fd9.zip
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: Tejun Heo <tj@kernel.org> Cc: Huang Ying <ying.huang@intel.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--crypto/cryptd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index 35335825..3d7fe830 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -99,7 +99,7 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue,
struct cryptd_cpu_queue *cpu_queue;
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);
queue_work_on(cpu, kcrypto_wq, &cpu_queue->work);
put_cpu();