Re: [PATCH 6/7] s390: time: Provide read_boot_clock64() and read_persistent_clock64()

From: Ingo Molnar
Date: Thu May 21 2015 - 02:23:17 EST



* John Stultz <john.stultz@xxxxxxxxxx> wrote:

> From: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
>
> As part of addressing "y2038 problem" for in-kernel uses, this
> patch converts read_boot_clock() to read_boot_clock64() and
> read_persistent_clock() to read_persistent_clock64() using
> timespec64.

s/addressing "y2037 problem"/
addressing the "y2037 problem"

> Rename some timespec to timespec64 in time.c and related references.

This sentence does not parse. Did you want to say:

Rename some instances of 'timespec' to 'timespec64' in time.c and
related references.

?

> @@ -108,10 +109,10 @@ int get_sync_clock(unsigned long long *clock);
> void init_cpu_timer(void);
> unsigned long long monotonic_clock(void);
>
> -void tod_to_timeval(__u64, struct timespec *);
> +void tod_to_timeval(__u64, struct timespec64 *);

Please use proper prototypes with parameters spelled out as well, so
that people grepping for APIs don't have to guess too much.

> - rc += sprintf(out_buf, "%02i %011lu:%06lu %1u %1s %02i %p ",
> - area, time_spec.tv_sec, time_spec.tv_nsec / 1000, level,
> - except_str, entry->id.fields.cpuid, (void *) caller);
> + rc += sprintf(out_buf, "%02i %011lld:%06lu %1u %1s %02i %p ",
> + area, (long long) time_spec.tv_sec,
> + time_spec.tv_nsec / 1000, level, except_str,
> + entry->id.fields.cpuid, (void *) caller);

Unnecessary space before the casts.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/