mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00: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
@ -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…
Reference in New Issue
Block a user