[svn-commits] sruffell: linux/trunk r10252 - in /linux/trunk: drivers/dahdi/wctc4xxp/ inclu...

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


Author: sruffell
Date: Fri Oct 21 14:32:25 2011
New Revision: 10252

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10252
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>

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

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=10252&r1=10251&r2=10252
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Fri Oct 21 14:32:25 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/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=10252&r1=10251&r2=10252
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Fri Oct 21 14:32:25 2011
@@ -1380,6 +1380,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