[dahdi-commits] tzafrir: linux/trunk r4688 - in /linux/trunk/drivers/dahdi: ./ xpp/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Sun Aug 3 13:06:16 CDT 2008
Author: tzafrir
Date: Sun Aug 3 13:06:15 2008
New Revision: 4688
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4688
Log:
Do use printk-s without a priority when continuing previous printk.
Also remove a small duplication in dahdi-base.c, as I'm too lazy to
fix in two separate places.
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/drivers/dahdi/voicebus.c
linux/trunk/drivers/dahdi/xpp/card_fxs.c
linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
linux/trunk/drivers/dahdi/xpp/xproto.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=4688&r1=4687&r2=4688
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Sun Aug 3 13:06:15 2008
@@ -1614,6 +1614,20 @@
return kzalloc(sizeof(struct dahdi_hdlc), GFP_KERNEL);
}
+static inline print_debug_writebuf(struct dahdi_chan* ss, struct sk_buff *skb,
+ int oldbuf)
+{
+#ifdef CONFIG_DAHDI_DEBUG
+ int x;
+
+ module_printk(KERN_NOTICE, "Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf);
+ module_printk(KERN_DEBUG "");
+ for (x=0;x<ss->writen[oldbuf];x++)
+ printk("%02x ", ss->writebuf[oldbuf][x]);
+ printk("\n");
+#endif
+}
+
#ifdef NEW_HDLC_INTERFACE
static int dahdi_xmit(struct sk_buff *skb, struct net_device *dev)
{
@@ -1674,12 +1688,7 @@
dev->trans_start = jiffies;
stats->tx_packets++;
stats->tx_bytes += ss->writen[oldbuf];
-#ifdef CONFIG_DAHDI_DEBUG
- module_printk(KERN_NOTICE, "Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf);
- for (x=0;x<ss->writen[oldbuf];x++)
- module_printk(KERN_DEBUG,"%02x ", ss->writebuf[oldbuf][x]);
- module_printk(KERN_DEBUG "\n");
-#endif
+ print_debug_writebuf(ss, skb, outbug);
retval = 0;
/* Free the SKB */
dev_kfree_skb_any(skb);
@@ -1775,12 +1784,7 @@
some space for us */
ss->outwritebuf = oldbuf;
}
-#ifdef CONFIG_DAHDI_DEBUG
- module_printk(KERN_NOTICE, "Buffered %d bytes (skblen = %d) to go out in buffer %d\n", ss->writen[oldbuf], skb->len, oldbuf);
- for (x=0;x<ss->writen[oldbuf];x++)
- module_printk(KERN_DEBUG, "%02x ", ss->writebuf[oldbuf][x]);
- module_printk(KERN_DEBUG, "\n");
-#endif
+ print_debug_writebuf(ss, skb, outbug);
retval = 1;
}
spin_unlock_irqrestore(&ss->lock, flags);
@@ -1906,8 +1910,11 @@
myamnt = chan->readn[res];
module_printk(KERN_NOTICE, "dahdi_chan_read(unit: %d, inwritebuf: %d, outwritebuf: %d amnt: %d\n",
unit, chan->inwritebuf, chan->outwritebuf, myamnt);
- module_printk(KERN_DEBUG, "\t("); for (x = 0; x < myamnt; x++) module_printk((KERN_DEBUG, x ? " %02x" : "%02x"), (unsigned char)usrbuf[x]);
- module_printk(KERN_DEBUG, ")\n");
+
+ module_printk(KERN_DEBUG, "\t(");
+ for (x = 0; x < myamnt; x++)
+ printk((x ? " %02x" : "%02x"), (unsigned char)usrbuf[x]);
+ printk(")\n");
}
#endif
/* end addition */
Modified: linux/trunk/drivers/dahdi/voicebus.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/voicebus.c?view=diff&rev=4688&r1=4687&r2=4688
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus.c (original)
+++ linux/trunk/drivers/dahdi/voicebus.c Sun Aug 3 13:06:15 2008
@@ -682,10 +682,11 @@
unsigned char *c;
c = vbb;
printk(KERN_DEBUG "Packet %d\n", count);
+ printk(KERN_DEBUG "");
for (x = 1; x <= vb->framesize; ++x) {
- printk(KERN_DEBUG "%02x ", c[x]);
+ printk("%02x ", c[x]);
if (x % 16 == 0) {
- printk(KERN_DEBUG "\n");
+ printk("\n");
}
}
printk(KERN_DEBUG "\n\n");
Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=4688&r1=4687&r2=4688
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Sun Aug 3 13:06:15 2008
@@ -1010,10 +1010,10 @@
LINE_DBG(GENERAL, xpd, pos, "MSG:");
for(j = 0; j < DAHDI_CHUNKSIZE; j++) {
if(debug)
- printk(KERN_DEBUG " %02X", writechunk[j]);
+ printk(" %02X", writechunk[j]);
}
if(debug)
- printk(KERN_DEBUG "\n");
+ printk("\n");
}
#endif
if(unlikely(mem_equal(writechunk, FSK_COMMON_PATTERN, DAHDI_CHUNKSIZE)))
Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=4688&r1=4687&r2=4688
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Sun Aug 3 13:06:15 2008
@@ -803,23 +803,23 @@
DBG(GENERAL, "span->mainttimer=%d\n", span->mainttimer);
switch(cmd) {
case DAHDI_MAINT_NONE:
- printk(KERN_INFO "XXX Turn off local and remote loops XXX\n");
+ INFO("XXX Turn off local and remote loops XXX\n");
break;
case DAHDI_MAINT_LOCALLOOP:
- printk(KERN_INFO "XXX Turn on local loopback XXX\n");
+ INFO("XXX Turn on local loopback XXX\n");
break;
case DAHDI_MAINT_REMOTELOOP:
- printk(KERN_INFO "XXX Turn on remote loopback XXX\n");
+ INFO("XXX Turn on remote loopback XXX\n");
break;
case DAHDI_MAINT_LOOPUP:
- printk(KERN_INFO "XXX Send loopup code XXX\n");
+ INFO("XXX Send loopup code XXX\n");
// CALL_XMETHOD(LOOPBACK_AX, xpd->xbus, xpd, loopback_data, ARRAY_SIZE(loopback_data));
break;
case DAHDI_MAINT_LOOPDOWN:
- printk(KERN_INFO "XXX Send loopdown code XXX\n");
+ INFO("XXX Send loopdown code XXX\n");
break;
case DAHDI_MAINT_LOOPSTOP:
- printk(KERN_INFO "XXX Stop sending loop codes XXX\n");
+ INFO("XXX Stop sending loop codes XXX\n");
break;
default:
ERR("XPP: Unknown maint command: %d\n", cmd);
Modified: linux/trunk/drivers/dahdi/xpp/xproto.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/xproto.c?view=diff&rev=4688&r1=4687&r2=4688
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xproto.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xproto.c Sun Aug 3 13:06:15 2008
@@ -309,7 +309,7 @@
int i;
byte *p = (byte *)packet;
- printk(KERN_DEBUG " BYTES: ");
+ printk(" BYTES: ");
for(i = 0; i < XPACKET_LEN(packet); i++) {
static int limiter = 0;
@@ -325,11 +325,11 @@
break;
}
if (debug)
- printk(KERN_DEBUG "%02X ", p[i]);
+ printk("%02X ", p[i]);
}
}
#endif
- printk(KERN_DEBUG "\n");
+ printk("\n");
}
void dump_reg_cmd(const char msg[], bool writing, xbus_t *xbus,
More information about the dahdi-commits
mailing list