diff options
author | 2022-04-04 16:47:55 +0200 | |
---|---|---|
committer | 2022-04-09 22:19:39 +0200 | |
commit | a2026e44eff5d74a83d7ffee6325a007bef85385 (patch) | |
tree | bce89de4ce23346ff21fa3f837dcd2cc29d6763b /scripts/gdb/linux/utils.py | |
parent | timers: Initialize base::next_expiry_recalc in timers_prepare_cpu() (diff) | |
download | linux-dev-a2026e44eff5d74a83d7ffee6325a007bef85385.tar.xz linux-dev-a2026e44eff5d74a83d7ffee6325a007bef85385.zip |
timers: Simplify calc_index()
The level granularity round up of calc_index() does:
(x + (1 << n)) >> n
which is obviously equivalent to
(x >> n) + 1
but compilers can't figure that out despite the fact that the input range
is known to not cause an overflow. It's neither intuitive to read.
Just write out the obvious.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/87h778j46c.ffs@tglx
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions