From: Christoph Lameter Date: Sat, 3 Oct 2009 10:48:23 +0000 (+0900) Subject: this_cpu: Use this_cpu_ptr in crypto subsystem X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b44f4861f4cc1089424821f078d38441f8b4983;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Cc: Huang Ying Signed-off-by: Christoph Lameter Signed-off-by: Tejun Heo --- diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 35335825a4ef..3d7fe8306e2a 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();