Re: [patch 1/1] alpha/osf_sys: use helper functions to convert between tv and jiffies

From: Alexey Dobriyan
Date: Sat May 14 2005 - 06:24:58 EST


On Saturday 14 May 2005 01:44, domen@xxxxxxxxxxxx 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/