[PATCH -mm] hrtimer: Build fix for !KTIME_SCALAR on 32bit.

From: Paul Mundt
Date: Tue Sep 11 2007 - 02:42:51 EST


On BITS_PER_LONG < 64 and !CONFIG_KTIME_SCALAR we get this:

CC kernel/hrtimer.o
kernel/hrtimer.c:303: error: redefinition of '__kstrtab_ktime_add_ns'
kernel/hrtimer.c:279: error: previous definition of '__kstrtab_ktime_add_ns' was here
kernel/hrtimer.c:303: error: redefinition of '__ksymtab_ktime_add_ns'
kernel/hrtimer.c:279: error: previous definition of '__ksymtab_ktime_add_ns' was here
kernel/hrtimer.c:313: error: redefinition of 'ktime_sub_ns'
kernel/hrtimer.c:289: error: previous definition of 'ktime_sub_ns' was here
make[1]: *** [kernel/hrtimer.o] Error 1
make: *** [kernel] Error 2

For some reason the ktime_sub_ns() addition was duplicated, and someone
forgot to change the name of the ktime_add_ns() symbol export they lifted.

Get it building again.

Signed-off-by: Paul Mundt <lethal@xxxxxxxxxxxx>

--

kernel/hrtimer.c | 24 ------------------------
1 file changed, 24 deletions(-)

--- linux-2.6.23-rc4-mm1.orig/kernel/hrtimer.c 2007-09-11 15:15:56.000000000 +0900
+++ linux-2.6.23-rc4-mm1/kernel/hrtimer.c 2007-09-11 15:30:20.000000000 +0900
@@ -300,30 +300,6 @@
return ktime_sub(kt, tmp);
}

-EXPORT_SYMBOL_GPL(ktime_add_ns);
-
-/**
- * ktime_sub_ns - Subtract a scalar nanoseconds value from a ktime_t variable
- * @kt: minuend
- * @nsec: the scalar nsec value to subtract
- *
- * Returns the subtraction of @nsec from @kt in ktime_t format
- */
-ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec)
-{
- ktime_t tmp;
-
- if (likely(nsec < NSEC_PER_SEC)) {
- tmp.tv64 = nsec;
- } else {
- unsigned long rem = do_div(nsec, NSEC_PER_SEC);
-
- tmp = ktime_set((long)nsec, rem);
- }
-
- return ktime_sub(kt, tmp);
-}
-
EXPORT_SYMBOL_GPL(ktime_sub_ns);
# endif /* !CONFIG_KTIME_SCALAR */

-
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/