Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: caam - Fix opencoded cpumask_next_wrap() in caam_drv_ctx_init()

The dedicated cpumask_next_wrap() is more verbose and better optimized
comparing to cpumask_next() followed by cpumask_first().

Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Yury Norov [NVIDIA] and committed by
Herbert Xu
4b7ed1ce ea87e6c4

+1 -4
+1 -4
drivers/crypto/caam/qi.c
··· 442 442 if (!cpumask_test_cpu(*cpu, cpus)) { 443 443 int *pcpu = &get_cpu_var(last_cpu); 444 444 445 - *pcpu = cpumask_next(*pcpu, cpus); 446 - if (*pcpu >= nr_cpu_ids) 447 - *pcpu = cpumask_first(cpus); 445 + *pcpu = cpumask_next_wrap(*pcpu, cpus); 448 446 *cpu = *pcpu; 449 - 450 447 put_cpu_var(last_cpu); 451 448 } 452 449 drv_ctx->cpu = *cpu;