Messages in this thread | | | From | Alexey Dobriyan <> | Subject | Re: [patch 1/1] alpha/osf_sys: use helper functions to convert between tv and jiffies | Date | Sat, 14 May 2005 15:27:28 +0400 |
| |
On Saturday 14 May 2005 01:44, domen@coderock.org wrote: > Use helper functions to convert between timeval structure and jiffies > rather than custom logic.
> --- quilt.orig/arch/alpha/kernel/osf_sys.c > +++ quilt/arch/alpha/kernel/osf_sys.c
> - ticks = tmp.tv_usec; > - ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ); > - ticks += tmp.tv_sec * HZ; > + ticks = timeval_to_jiffies(&tmp);
> - tmp.tv_sec = ticks / HZ; > - tmp.tv_usec = ticks % HZ; > + jiffies_to_timeval(ticks, &tmp);
Nitpicking comment: both timeval_to_jiffies and jiffies_to_timeval are prototyped in include/linux/jiffies.h. However, arch/alpha/kernel/osf_sys.c doesn't directly #include it. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |