[svn-commits] sruffell: branch linux/2.5 r10254 - in /linux/branches/2.5: drivers/dahdi/wct...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 21 14:48:27 CDT 2011


Author: sruffell
Date: Fri Oct 21 14:48:24 2011
New Revision: 10254

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10254
Log:
dahdi: Move WARN_ON_ONCE from wctc4xxp driver to include/dahdi/kernel.h

I only generally test on RHEL 4 when testing against kernels older
than 2.6.18. Apparently OpenSUSE 10.1 runs with 2.6.16 and doesn't
have WARN_ON_ONCE backported. I took the patch Richard Miller
originally attached to the issue and moved it to
include/dahdi/kernel.h so it would be available for all the board
drivers in the future.

Internal-Issue-ID: DAHLIN-260
Reported-by: Richard Miller
Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10252

Modified:
    linux/branches/2.5/drivers/dahdi/wctc4xxp/base.c
    linux/branches/2.5/include/dahdi/kernel.h

Modified: linux/branches/2.5/drivers/dahdi/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.5/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=10254&r1=10253&r2=10254
==============================================================================
--- linux/branches/2.5/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/branches/2.5/drivers/dahdi/wctc4xxp/base.c Fri Oct 21 14:48:24 2011
@@ -72,20 +72,6 @@
 	if ((debug & _dbgmask) == (_dbgmask)) {				\
 		dev_info(&(wc)->pdev->dev, _fmt, ## _args);		\
 	}								\
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
-#ifndef WARN_ON_ONCE
-#define WARN_ON_ONCE(__condition) do {         \
-	static int __once = 1;                 \
-	if (unlikely(__condition)) {           \
-		if (__once) {                  \
-			__once = 0;            \
-			WARN_ON(0);            \
-		}                              \
-	}                                      \
-} while (0)
-#endif
-#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
 /* also added in RHEL kernels with the OpenInfiniband backport: */

Modified: linux/branches/2.5/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.5/include/dahdi/kernel.h?view=diff&rev=10254&r1=10253&r2=10254
==============================================================================
--- linux/branches/2.5/include/dahdi/kernel.h (original)
+++ linux/branches/2.5/include/dahdi/kernel.h Fri Oct 21 14:48:24 2011
@@ -1364,6 +1364,19 @@
         new->prev = old->prev;
         new->prev->next = new;
 }
+
+#ifndef WARN_ON_ONCE
+#define WARN_ON_ONCE(__condition) do {         \
+	static int __once = 1;                 \
+	if (unlikely(__condition)) {           \
+		if (__once) {                  \
+			__once = 0;            \
+			WARN_ON(0);            \
+		}                              \
+	}                                      \
+} while (0)
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
 #define kzalloc(a, b) kcalloc(1, a, b)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)




More information about the svn-commits mailing list