[svn-commits] sruffell: linux/trunk r9322 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Sep 13 21:21:02 CDT 2010
Author: sruffell
Date: Mon Sep 13 21:20:58 2010
New Revision: 9322
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9322
Log:
dahdi: Remove unused functions __buf_munge and __buf_cpush.
These functions were only defined if BUF_MUNGE was defined, but even if
that symbol is defined there is not anyplace in the driver where these
functions were then called. This has been in the code since rev 87 so
this is most likely stale debugging code.
Feel free to revert if this is actually used somewhere that is not
apparent.
Here is where the functions were originally added to the drivers:
http://svnview.digium.com/svn/zaptel?view=revision&revision=87
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
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=9322&r1=9321&r2=9322
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Sep 13 21:20:58 2010
@@ -57,8 +57,6 @@
#include <asm/atomic.h>
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-
-/* #define BUF_MUNGE */
#include <dahdi/version.h>
/* Grab fasthdlc with tables */
@@ -1145,33 +1143,6 @@
return q->buf[q->outbuf];
}
-#ifdef BUF_MUNGE
-static u_char *__buf_cpush(struct confq *q)
-{
- int pos;
- /* If we have no space, return where the
- last space that we *did* have was */
- if (q->inbuf > -1)
- return NULL;
- pos = q->outbuf - 1;
- if (pos < 0)
- pos += DAHDI_CB_SIZE;
- return q->buf[pos];
-}
-
-static void __buf_munge(struct dahdi_chan *chan, u_char *old, u_char *new)
-{
- /* Run a weighted average of the old and new, in order to
- mask a missing sample */
- int x;
- int val;
- for (x=0;x<DAHDI_CHUNKSIZE;x++) {
- val = x * DAHDI_XLAW(new[x], chan) + (DAHDI_CHUNKSIZE - x - 1) * DAHDI_XLAW(old[x], chan);
- val = val / (DAHDI_CHUNKSIZE - 1);
- old[x] = DAHDI_LIN2X(val, chan);
- }
-}
-#endif
/* Push something onto the queue, or assume what
is there is valid if data is NULL */
static int __buf_push(struct confq *q, u_char *data)
More information about the svn-commits
mailing list