On Thursday 16 April 2015 20:04:14 Baolin Wang wrote:
return -EINVAL; kc = clockid_to_kclock(timr->it_clock);
if (WARN_ON_ONCE(!kc || !kc->timer_set))
if (WARN_ON_ONCE(!kc || !kc->timer_set64 || !kc->timer_set)) { error = -EINVAL;
else
error = kc->timer_set(timr, flags, &new_spec, rtn);
} else {
if (kc->timer_set64) {
new_spec64 = itimerspec_to_itimerspec64(new_spec);
error = kc->timer_set64(timr, flags, &new_spec64,
&old_spec64);
if (old_setting)
old_spec =
itimerspec64_to_itimerspec(old_spec64);
} else {
error = kc->timer_set(timr, flags, &new_spec, rtn);
}
} unlock_timer(timr, flag); if (error == TIMER_RETRY) {
This part however is what I think you misunderstood: all the callers of the kc->*64() function callbacks should be changed in patch 5, which introduces the function pointers. You could even split that part out into a patch between 4 and 5, but I think that would not be helpful. However, the rest of this patch is very clearly a separate step from the introduction of the callback pointers.
Arnd
Sorry, i have not understand deeply here yet. you mean the blue part also need remove to patch 5?
I don't know what is blue on your screen. The patch cited above should be part of patch 5, yes.
The former ptp patch series also introduce the new callback pointers firstly, then convert each driver separately. So here i introduce the new 64bit callback pointers in patch 5, then convert each driver, include the posix-timers.c driver. So i think the posix-timers.c driver's modification should be split into one patch, is it right?
The point is that posix-timers.c contains both the framework and some of the k_clock implementations. The framework (the structure definition, and any callers of it) should be done in one patch, while the k_clock changes (clock_realtime, clock_monotonic, clock_monotonic_raw, clock_realtime_coarse, clock_monotonic_coarse, clock_tai, and clock_boottime) should be done in a second step.
This is exactly how the ptp changes were done.
Arnd