mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
tick: Use tick_check_replacement() instead of open coding it
The function tick_check_replacement() is the combination of tick_check_percpu() and tick_check_preferred(), but tick_check_new_device() has the same logic open coded. Use the helper to simplify the code. [ tglx: Massage changelog ] Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210326022328.3266-1-wangwensheng4@huawei.com
This commit is contained in:
parent
07ff4aed01
commit
d7840aaadd
@ -348,12 +348,7 @@ void tick_check_new_device(struct clock_event_device *newdev)
|
||||
td = &per_cpu(tick_cpu_device, cpu);
|
||||
curdev = td->evtdev;
|
||||
|
||||
/* cpu local device ? */
|
||||
if (!tick_check_percpu(curdev, newdev, cpu))
|
||||
goto out_bc;
|
||||
|
||||
/* Preference decision */
|
||||
if (!tick_check_preferred(curdev, newdev))
|
||||
if (!tick_check_replacement(curdev, newdev))
|
||||
goto out_bc;
|
||||
|
||||
if (!try_module_get(newdev->owner))
|
||||
|
Loading…
Reference in New Issue
Block a user