* John Stultz <john.stultz@xxxxxxxxxx> wrote:
+static void tk_set_sleep_time(struct timekeeper *tk, struct timespec t)asserts like this can be put into a single line - we rarely need
+ /* Verify consistency before modifying */
+ WARN_ON_ONCE(tk->offs_boot.tv64 !=
to read them if they don't trigger - and making them
non-intrusive oneliners is a bonus.
@@ -456,8 +478,8 @@ int timekeeping_inject_offset(struct timespec *ts)There's a *lot* of unnecessary ugliness here and in many other
- timekeeper.wall_to_monotonic =
- timespec_sub(timekeeper.wall_to_monotonic, *ts);
+ timespec_sub(timekeeper.wall_to_monotonic, *ts));
places in kernel/time/ due to repeating patterns of
"timekeeper.", which gets repeated many times and blows up line
Please add this to the highest level (system call, irq handler,
struct timekeeper *tk = &timekeeper;
and pass that down to lower levels. The tk-> pattern will be the
obvious thing to type in typical time handling functions.
This increases readability and clarifies the data flow and might
bring other advantages in the future.
I see a pattern with the newlines there - and this isnt the
first patch from you that has that problem.