]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
tick: Remove pointless cpu valid check in hotplug code
authorThomas Gleixner <tglx@linutronix.de>
Sun, 6 Dec 2020 21:12:54 +0000 (22:12 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Dec 2020 10:26:27 +0000 (11:26 +0100)
commitf12ad423c4af877b2e4b5a80928b95195fccab04
tree60d3317a1c3d8ec0e094749088acfe0f63665225
parent533369b145d8d1bc44b8ed7f0dd0ecffb16384cc
tick: Remove pointless cpu valid check in hotplug code

tick_handover_do_timer() which is invoked when a CPU is unplugged has a
check for cpumask_first(cpu_online_mask) when it tries to hand over the
tick update duty.

Checking the result of cpumask_first() there is pointless because if the
online mask is empty at this point, then this would be the last CPU in the
system going offline, which is impossible. There is always at least one CPU
remaining. If online mask would be really empty then the timer duty would
be the least of the resulting problems.

Remove the well meant check simply because it is pointless and confusing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20201206212002.582579516@linutronix.de
kernel/time/tick-common.c