]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: replace cpumask_weight with cpumask_empty in clocksource.c
authorYury Norov <yury.norov@gmail.com>
Sun, 23 Jan 2022 18:38:55 +0000 (10:38 -0800)
committerYury Norov <yury.norov@gmail.com>
Fri, 3 Jun 2022 13:52:57 +0000 (06:52 -0700)
commita6aa3fcd9f82d20401afc0dac594076ac6f17152
treeedc655fb6e42adaf296143e24830ef8357662c77
parentcb4b300ab59dcc09207e7297baf529c76c27b934
clocksource: replace cpumask_weight with cpumask_empty in clocksource.c

clocksource_verify_percpu() calls cpumask_weight() to check if any bit of
a given cpumask is set. We can do it more efficiently with cpumask_empty()
because cpumask_empty() stops traversing the cpumask as soon as it finds
first set bit, while cpumask_weight() counts all bits unconditionally.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
kernel/time/clocksource.c