diff options
author | Thomas Gleixner | 2022-04-04 16:47:55 +0200 |
---|---|---|
committer | Thomas Gleixner | 2022-04-09 22:19:39 +0200 |
commit | a2026e44eff5d74a83d7ffee6325a007bef85385 (patch) | |
tree | bce89de4ce23346ff21fa3f837dcd2cc29d6763b /block/blk-settings.c | |
parent | 2731aa7d65dbb31c6dad14347c37d522bb3bc7c6 (diff) |
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 'block/blk-settings.c')
0 files changed, 0 insertions, 0 deletions