mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 21:26:14 +01:00
time/sched_clock: Fix formatting of frequency reporting code
Use flat rather than nested indentation for chained else/if clauses as
per coding-style.rst:
if (x == y) {
..
} else if (x > y) {
...
} else {
....
}
This also improves readability.
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2204240148220.9383@angie.orcam.me.uk
This commit is contained in:
parent
cc1b923a4e
commit
f4b62e1e11
1 changed files with 4 additions and 6 deletions
|
|
@ -202,13 +202,11 @@ sched_clock_register(u64 (*read)(void), int bits, unsigned long rate)
|
|||
if (r >= 4000000) {
|
||||
r = DIV_ROUND_CLOSEST(r, 1000000);
|
||||
r_unit = 'M';
|
||||
} else if (r >= 4000) {
|
||||
r = DIV_ROUND_CLOSEST(r, 1000);
|
||||
r_unit = 'k';
|
||||
} else {
|
||||
if (r >= 4000) {
|
||||
r = DIV_ROUND_CLOSEST(r, 1000);
|
||||
r_unit = 'k';
|
||||
} else {
|
||||
r_unit = ' ';
|
||||
}
|
||||
r_unit = ' ';
|
||||
}
|
||||
|
||||
/* Calculate the ns resolution of this counter */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue