public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] hrtimer: Build fix for !KTIME_SCALAR on 32bit.
@ 2007-09-11  6:39 Paul Mundt
  0 siblings, 0 replies; only message in thread
From: Paul Mundt @ 2007-09-11  6:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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@linux-sh.org>

--

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-11  6:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-11  6:39 [PATCH -mm] hrtimer: Build fix for !KTIME_SCALAR on 32bit Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox