[dahdi-commits] sruffell: branch linux/2.4 r10533 - /linux/branches/2.4/drivers/dahdi/xpp/

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Mar 16 12:08:08 CDT 2012


Author: sruffell
Date: Fri Mar 16 12:08:04 2012
New Revision: 10533

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10533
Log:
xpp: '%d' -> '%lu' when displaying module_refcount on kernel versions >= 3.3

Upstream commit bd77c047 "module: struct module_ref should contains long
fields" changed the return of module_refcount from int to unsigned long. This
change eliminates a warning from the string format specifier.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

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

Conflicts:

	drivers/dahdi/xpp/xproto.c

Modified:
    linux/branches/2.4/drivers/dahdi/xpp/xproto.c

Modified: linux/branches/2.4/drivers/dahdi/xpp/xproto.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.4/drivers/dahdi/xpp/xproto.c?view=diff&rev=10533&r1=10532&r2=10533
==============================================================================
--- linux/branches/2.4/drivers/dahdi/xpp/xproto.c (original)
+++ linux/branches/2.4/drivers/dahdi/xpp/xproto.c Fri Mar 16 12:08:04 2012
@@ -75,6 +75,12 @@
 	return xprotocol_tables[cardtype];
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
+#define MODULE_REFCOUNT_FORMAT "%s refcount was %d\n"
+#else
+#define MODULE_REFCOUNT_FORMAT "%s refcount was %lu\n"
+#endif
+
 const xproto_table_t *xproto_get(xpd_type_t cardtype)
 {
 	const xproto_table_t *xtable;
@@ -94,7 +100,8 @@
 	if(xtable) {
 		BUG_ON(!xtable->owner);
 #ifdef CONFIG_MODULE_UNLOAD
-		DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
+		DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
+		    module_refcount(xtable->owner));
 #endif
 		if(!try_module_get(xtable->owner)) {
 			ERR("%s: try_module_get for %s failed.\n", __FUNCTION__, xtable->name);
@@ -108,7 +115,8 @@
 {
 	BUG_ON(!xtable);
 #ifdef CONFIG_MODULE_UNLOAD
-	DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
+	DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
+	    module_refcount(xtable->owner));
 	BUG_ON(module_refcount(xtable->owner) <= 0);
 #endif
 	module_put(xtable->owner);




More information about the dahdi-commits mailing list