[dahdi-commits] tzafrir: linux/trunk r10459 - in /linux/trunk/drivers/dahdi: ./ hpec/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Feb 9 09:25:07 CST 2012
Author: tzafrir
Date: Thu Feb 9 09:25:03 2012
New Revision: 10459
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10459
Log:
code cleanup: remove unused debug_printk()
The dahdi_echocan_* modules had an unused debug_printk() macro. Remove
them because:
* They were unused
* There were multiple definitions
* They were unsafe. Someone doing an
if(foo)
debug_printk(...);
else
do_something();
may be surprised ;-)
* They used 'debug' as a debug level, while the rest of DAHDI debug
macros treat it as a bit-field.
Leave only a single definition in wcte12xp/base.c which is safe.
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_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_sec.c
linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c
linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
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=10459&r1=10458&r2=10459
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c Thu Feb 9 09:25:03 2012
@@ -37,8 +37,6 @@
#include <dahdi/kernel.h>
static int debug;
-
-#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,
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec);
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=10459&r1=10458&r2=10459
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c Thu Feb 9 09:25:03 2012
@@ -43,8 +43,6 @@
static int debug;
static int aggressive;
-
-#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 */
/* #define MEC2_STATS 4000 */
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=10459&r1=10458&r2=10459
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c Thu Feb 9 09:25:03 2012
@@ -44,8 +44,6 @@
static int debug;
static int aggressive;
-#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)
#define RESTORE_COEFFS {\
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=10459&r1=10458&r2=10459
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_sec.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_sec.c Thu Feb 9 09:25:03 2012
@@ -47,8 +47,6 @@
#include <dahdi/kernel.h>
static int debug;
-
-#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=10459&r1=10458&r2=10459
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c Thu Feb 9 09:25:03 2012
@@ -46,8 +46,6 @@
#include <dahdi/kernel.h>
static int debug;
-
-#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=10459&r1=10458&r2=10459
==============================================================================
--- linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c (original)
+++ linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c Thu Feb 9 09:25:03 2012
@@ -30,8 +30,6 @@
#include <dahdi/kernel.h>
static int debug;
-
-#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "hpec_user.h"
#include "hpec.h"
More information about the dahdi-commits
mailing list