[dahdi-commits] tzafrir: linux/trunk r10458 - in /linux/trunk: drivers/dahdi/ drivers/dahdi/h...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Feb 9 09:24:45 CST 2012
Author: tzafrir
Date: Thu Feb 9 09:24:40 2012
New Revision: 10458
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10458
Log:
code cleanup - refactor module_printk()
* Remove multiple definitions
* Move canonical one to include/dahdi/kernel.h
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/drivers/dahdi/dahdi-sysfs.c
linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c
linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c
linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c
linux/trunk/drivers/dahdi/dahdi_echocan_sec.c
linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c
linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Feb 9 09:24:40 2012
@@ -60,7 +60,6 @@
#include <asm/atomic.h>
#define DAHDI_PRINK_MACROS_USE_debug
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
/* Grab fasthdlc with tables */
#define FAST_HDLC_NEED_TABLES
Modified: linux/trunk/drivers/dahdi/dahdi-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-sysfs.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-sysfs.c Thu Feb 9 09:24:40 2012
@@ -6,10 +6,6 @@
#include <linux/slab.h>
#include "dahdi.h"
-
-/* FIXME: Move to kernel.h */
-#define module_printk(level, fmt, args...) \
- printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
#define CLASS_DEV_CREATE(class, devt, device, name) \
Modified: linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c Thu Feb 9 09:24:40 2012
@@ -38,7 +38,6 @@
static int debug;
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
static int echo_can_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
Modified: linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c Thu Feb 9 09:24:40 2012
@@ -44,7 +44,6 @@
static int debug;
static int aggressive;
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
/* Uncomment to provide summary statistics for overall echo can performance every 4000 samples */
Modified: linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c Thu Feb 9 09:24:40 2012
@@ -44,7 +44,6 @@
static int debug;
static int aggressive;
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#define ABS(a) abs(a!=-32768?a:-32767)
Modified: linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c Thu Feb 9 09:24:40 2012
@@ -35,8 +35,6 @@
//#include <linux/oslec.h>
#include <dahdi/kernel.h>
-
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
static int echo_can_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec);
Modified: linux/trunk/drivers/dahdi/dahdi_echocan_sec.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_sec.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_sec.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_sec.c Thu Feb 9 09:24:40 2012
@@ -48,7 +48,6 @@
static int debug;
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "arith.h"
Modified: linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c Thu Feb 9 09:24:40 2012
@@ -47,7 +47,6 @@
static int debug;
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "fir.h"
Modified: linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c (original)
+++ linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c Thu Feb 9 09:24:40 2012
@@ -31,7 +31,6 @@
static int debug;
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "hpec_user.h"
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=10458&r1=10457&r2=10458
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Thu Feb 9 09:24:40 2012
@@ -1516,6 +1516,10 @@
#define DAHDI_PSEUDO 255
/* prink-wrapper macros */
+
+#define module_printk(level, fmt, args...) \
+ printk(level "%s: " fmt, THIS_MODULE->name, ## args)
+
#define DAHDI_PRINTK(level, category, fmt, ...) \
printk(KERN_ ## level "%s%s-%s: " fmt, #level, category, \
THIS_MODULE->name, ## __VA_ARGS__)
More information about the dahdi-commits
mailing list