Messages in this thread |  | | Date | Tue, 28 Feb 2012 09:30:14 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 1/7] time: Condense timekeeper.xtime into xtime_sec |
| |
* John Stultz <john.stultz@linaro.org> wrote:
> On Tue, 2012-02-28 at 09:06 +0100, Ingo Molnar wrote: > > * John Stultz <john.stultz@linaro.org> wrote: > > > + > > > +static void timekeeper_set_xtime(struct timekeeper *tk, > > > + const struct timespec *ts) > > > > Pointless (because ugly) line break. > > > > > +{ > > > + tk->xtime_sec = ts->tv_sec; > > > + tk->xtime_nsec = ts->tv_nsec << tk->shift; > > > +} > > > + > > > + > > > +static void timekeeper_xtime_add(struct timekeeper *tk, > > > + const struct timespec *ts) > > > > Pointless (because ugly) line break. > > Ack on your other comments, but I'm not sure I'm following you here. > What would you rather see in this case?
Well, either not break the line really (it's just trivially above col80: it's 83 cols), or do a *sensible* line break - one of:
static void timekeeper_xtime_add(struct timekeeper *tk, const struct timespec *ts)
(here the arguments align vertically)
Or:
static void timekeeper_xtime_add(struct timekeeper *tk, const struct timespec *ts)
(here he return type is on a separate line)
Or, my favorite, just make the name shorter, because it's too long:
static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts)
Obviously this applies to other functions as well - the tk_*() method pattern should be applied consistently. Anyone reading time code will know that 'tk' is about the global timekeeper structure - no need to use the verbose name in methods.
Thanks,
Ingo
|  |