[PATCH 2.6.24-rt1] timer:fix build warning in timer.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the following compile warning without CONFIG_PREEMPT_RT:
kernel/timer.c:937: warning: ‘count_active_rt_tasks’ defined but not used

Signed-off-by: Shi Weihua <shiwh@xxxxxxxxxxxxxx> 

---
diff -urpN linux-2.6.24-rt1.orig/kernel/timer.c linux-2.6.24-rt1/kernel/timer.c
--- linux-2.6.24-rt1.orig/kernel/timer.c	2008-02-14 17:01:49.000000000 +0800
+++ linux-2.6.24-rt1/kernel/timer.c	2008-02-14 17:31:10.000000000 +0800
@@ -930,20 +930,18 @@ static unsigned long count_active_tasks(
 #endif
 }
 
+#ifdef CONFIG_PREEMPT_RT
 /*
  * Nr of active tasks - counted in fixed-point numbers
  */
 static unsigned long count_active_rt_tasks(void)
 {
-#ifdef CONFIG_PREEMPT_RT
 	extern unsigned long rt_nr_running(void);
 	extern unsigned long rt_nr_uninterruptible(void);
 
 	return (rt_nr_running() + rt_nr_uninterruptible()) * FIXED_1;
-#else
-	return 0;
-#endif
 }
+#endif
 
 /*
  * Hmm.. Changed this, as the GNU make sources (load.c) seems to

-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux