[svn-commits] kpfleming: linux/trunk r5162 - in /linux/trunk/drivers/dahdi: ./ wcb4xxp/ wct...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 28 16:49:03 CDT 2008


Author: kpfleming
Date: Tue Oct 28 16:49:02 2008
New Revision: 5162

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5162
Log:
fix a large number of warnings found by sparse, the kernel code sanity checking tool. some of these fixes are non-optimal (casting 'unsigned long' to '__user void *'), but are unavoidable in many cases. started from tzafrir's patch, did most of the work myself.

(closes issue #13763)
Reported by: tzafrir
Patches:
      sparse_fixes_1.diff uploaded by tzafrir (license 46)


Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/drivers/dahdi/dahdi_dummy.c
    linux/trunk/drivers/dahdi/dahdi_dynamic.c
    linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
    linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c
    linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
    linux/trunk/drivers/dahdi/dahdi_transcode.c
    linux/trunk/drivers/dahdi/pciradio.c
    linux/trunk/drivers/dahdi/tor2.c
    linux/trunk/drivers/dahdi/voicebus.c
    linux/trunk/drivers/dahdi/wcb4xxp/   (props changed)
    linux/trunk/drivers/dahdi/wcb4xxp/base.c
    linux/trunk/drivers/dahdi/wcfxo.c
    linux/trunk/drivers/dahdi/wct1xxp.c
    linux/trunk/drivers/dahdi/wct4xxp/base.c
    linux/trunk/drivers/dahdi/wctc4xxp/base.c
    linux/trunk/drivers/dahdi/wctdm.c
    linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c
    linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wcte11xp.c
    linux/trunk/drivers/dahdi/wcte12xp/GpakApi.c
    linux/trunk/drivers/dahdi/wcte12xp/base.c
    linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c
    linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.h

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=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Oct 28 16:49:02 2008
@@ -317,7 +317,7 @@
 	wait_queue_head_t sel;
 };
 
-LIST_HEAD(zaptimers);
+static LIST_HEAD(zaptimers);
 
 #ifdef DEFINE_SPINLOCK
 static DEFINE_SPINLOCK(zaptimerlock);
@@ -384,7 +384,7 @@
 static rwlock_t echocan_list_lock = RW_LOCK_UNLOCKED;
 #endif
 
-LIST_HEAD(echocan_list);
+static LIST_HEAD(echocan_list);
 
 struct echocan {
 	const struct dahdi_echocan *ec;
@@ -4823,8 +4823,6 @@
 	}
 
 	if ((ret == -ENODEV) && chan->ec_factory) {
-		const struct dahdi_echocan *ec_current;
-
 		switch (ecp->tap_length) {
 		case 32:
 		case 64:
@@ -7128,7 +7126,7 @@
 		__qevent(ss->master, event);
 }
 
-extern void dahdi_hdlc_abort(struct dahdi_chan *ss, int event)
+void dahdi_hdlc_abort(struct dahdi_chan *ss, int event)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&ss->lock, flags);
@@ -7136,7 +7134,7 @@
 	spin_unlock_irqrestore(&ss->lock, flags);
 }
 
-extern void dahdi_hdlc_putbuf(struct dahdi_chan *ss, unsigned char *rxb, int bytes)
+void dahdi_hdlc_putbuf(struct dahdi_chan *ss, unsigned char *rxb, int bytes)
 {
 	unsigned long flags;
 	int res;
@@ -7171,7 +7169,7 @@
 	spin_unlock_irqrestore(&ss->lock, flags);
 }
 
-extern void dahdi_hdlc_finish(struct dahdi_chan *ss)
+void dahdi_hdlc_finish(struct dahdi_chan *ss)
 {
 	int oldreadbuf;
 	unsigned long flags;
@@ -7217,7 +7215,7 @@
 }
 
 /* Returns 1 if EOF, 0 if data is still in frame, -1 if EOF and no buffers left */
-extern int dahdi_hdlc_getbuf(struct dahdi_chan *ss, unsigned char *bufptr, unsigned int *size)
+int dahdi_hdlc_getbuf(struct dahdi_chan *ss, unsigned char *bufptr, unsigned int *size)
 {
 	unsigned char *buf;
 	unsigned long flags;

Modified: linux/trunk/drivers/dahdi/dahdi_dummy.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dummy.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dummy.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dummy.c Tue Oct 28 16:49:02 2008
@@ -106,7 +106,7 @@
 
 #ifdef USE_HIGHRESTIMER
 #define CLOCK_SRC "HRtimer"
-struct hrtimer zaptimer;
+static struct hrtimer zaptimer;
 #elif defined(USE_RTC)
 #define CLOCK_SRC "RTC"
 static int rtc_rate = 0;

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic.c Tue Oct 28 16:49:02 2008
@@ -705,7 +705,7 @@
 			ztdynamic_run();
 		return 0;
 	case DAHDI_DYNAMIC_CREATE:
-		if (copy_from_user(&zds, (struct dahdi_dynamic_span *)data, sizeof(zds)))
+		if (copy_from_user(&zds, (__user const void *) data, sizeof(zds)))
 			return -EFAULT;
 		if (debug)
 			printk(KERN_DEBUG "Dynamic Create\n");
@@ -714,11 +714,11 @@
 			return res;
 		zds.spanno = res;
 		/* Let them know the new span number */
-		if (copy_to_user((struct dahdi_dynamic_span *)data, &zds, sizeof(zds)))
+		if (copy_to_user((__user void *) data, &zds, sizeof(zds)))
 			return -EFAULT;
 		return 0;
 	case DAHDI_DYNAMIC_DESTROY:
-		if (copy_from_user(&zds, (struct dahdi_dynamic_span *)data, sizeof(zds)))
+		if (copy_from_user(&zds, (__user const void *) data, sizeof(zds)))
 			return -EFAULT;
 		if (debug)
 			printk(KERN_DEBUG "Dynamic Destroy\n");
@@ -785,7 +785,7 @@
 	spin_unlock_irqrestore(&dlock, flags);
 }
 
-struct timer_list alarmcheck;
+static struct timer_list alarmcheck;
 
 static void check_for_red_alarm(unsigned long ignored)
 {
@@ -817,7 +817,7 @@
 	
 }
 
-int ztdynamic_init(void)
+static int ztdynamic_init(void)
 {
 	dahdi_set_dynamic_ioctl(ztdynamic_ioctl);
 	/* Start process to check for RED ALARM */
@@ -834,7 +834,7 @@
 	return 0;
 }
 
-void ztdynamic_cleanup(void)
+static void ztdynamic_cleanup(void)
 {
 #ifdef ENABLE_TASKLETS
 	if (taskletpending) {

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c Tue Oct 28 16:49:02 2008
@@ -59,7 +59,7 @@
 	struct ztdeth *next;
 } *zdevs = NULL;
 
-struct dahdi_span *ztdeth_getspan(unsigned char *addr, unsigned short subaddr)
+static struct dahdi_span *ztdeth_getspan(unsigned char *addr, unsigned short subaddr)
 {
 	unsigned long flags;
 	struct ztdeth *z;
@@ -207,9 +207,9 @@
 }
 
 static struct packet_type ztdeth_ptype = {
-	type: __constant_htons(ETH_P_DAHDI_DETH),		/* Protocol */
-	dev: NULL,					/* Device (NULL = wildcard) */
-	func: ztdeth_rcv,				/* Receiver */
+	.type = __constant_htons(ETH_P_DAHDI_DETH),		/* Protocol */
+	.dev = NULL,					/* Device (NULL = wildcard) */
+	.func = ztdeth_rcv,				/* Receiver */
 };
 
 static int digit2int(char d)
@@ -409,7 +409,7 @@
 };
 
 static struct notifier_block ztdeth_nblock = {
-	notifier_call: ztdeth_notifier,
+	.notifier_call = ztdeth_notifier,
 };
 
 static int __init ztdeth_init(void)

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c Tue Oct 28 16:49:02 2008
@@ -72,7 +72,7 @@
 	struct ztdlocal *next;
 } *zdevs = NULL;
 
-/*static*/ int ztdlocal_transmit(void *pvt, unsigned char *msg, int msglen)
+static int ztdlocal_transmit(void *pvt, unsigned char *msg, int msglen)
 {
 	struct ztdlocal *z;
 	unsigned long flags;
@@ -121,7 +121,7 @@
 	return -1;
 }
 
-/*static*/ void ztdlocal_destroy(void *pvt)
+static void ztdlocal_destroy(void *pvt)
 {
 	struct ztdlocal *z = pvt;
 	unsigned long flags;
@@ -156,7 +156,7 @@
 	}
 }
 
-/*static*/ void *ztdlocal_create(struct dahdi_span *span, char *address)
+static void *ztdlocal_create(struct dahdi_span *span, char *address)
 {
 	struct ztdlocal *z, *l;
 	unsigned long flags;
@@ -231,6 +231,7 @@
 			l->monitor_rx_peer = NULL;
 	}
 	kfree (z);
+	spin_unlock_irqrestore(&zlock, flags);
 	return NULL;
 	
 INVALID_ADDRESS:
@@ -247,13 +248,13 @@
 	NULL	/* flush */
 };
 
-/*static*/ int __init ztdlocal_init(void)
+static int __init ztdlocal_init(void)
 {
 	dahdi_dynamic_register(&ztd_local);
 	return 0;
 }
 
-/*static*/ void __exit ztdlocal_exit(void)
+static void __exit ztdlocal_exit(void)
 {
 	dahdi_dynamic_unregister(&ztd_local);
 }

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c Tue Oct 28 16:49:02 2008
@@ -425,6 +425,8 @@
 		 * we should pass it through uncancelled, as we are likely on hold */
 		u = isig;
 	} else {
+		int sign_error;
+
 		if (rs < -32768) {
 			rs = -32768;
 			ec->HCNTR_d = DEFAULT_HANGT;
@@ -435,7 +437,9 @@
 			RESTORE_COEFFS;
 		}
 
-		if (ABS(ABS(rs)-ABS(isig)) > MAX_SIGN_ERROR)
+		sign_error = ABS(rs) - ABS(isig);
+
+		if (ABS(sign_error) > MAX_SIGN_ERROR)
 		{
 			rs = 0;
 			RESTORE_COEFFS;

Modified: linux/trunk/drivers/dahdi/dahdi_transcode.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_transcode.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_transcode.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_transcode.c Tue Oct 28 16:49:02 2008
@@ -39,7 +39,7 @@
 #include <dahdi/kernel.h>
 
 static int debug;
-LIST_HEAD(trans);
+static LIST_HEAD(trans);
 static spinlock_t translock = SPIN_LOCK_UNLOCKED;
 
 EXPORT_SYMBOL(dahdi_transcoder_register);
@@ -235,8 +235,7 @@
 	struct dahdi_transcoder_channel *chan = NULL;
 	struct dahdi_transcoder_formats fmts;
 	
-	if (copy_from_user(&fmts, 
-		(struct dahdi_transcoder_formats*) data, sizeof(fmts))) {
+	if (copy_from_user(&fmts, (__user const void *) data, sizeof(fmts))) {
 		return -EFAULT;
 	}
 
@@ -292,7 +291,7 @@
 	struct dahdi_transcoder *cur;
 	struct dahdi_transcoder *tc = NULL;
 	
-	if (copy_from_user(&info, (const void *) data, sizeof(info))) {
+	if (copy_from_user(&info, (__user const void *) data, sizeof(info))) {
 		return -EFAULT;
 	}
 
@@ -314,7 +313,7 @@
 	info.srcfmts = tc->srcfmts;
 	info.dstfmts = tc->dstfmts;
 
-	return copy_to_user((void *) data, &info, sizeof(info)) ? -EFAULT : 0;
+	return copy_to_user((__user void *) data, &info, sizeof(info)) ? -EFAULT : 0;
 }
 
 static ssize_t dahdi_tc_write(struct file *file, __user const char *usrbuf, size_t count, loff_t *ppos)
@@ -408,16 +407,16 @@
 }
 
 static struct file_operations __dahdi_transcode_fops = {
-	owner:   THIS_MODULE,
-	open:    dahdi_tc_open,
-	release: dahdi_tc_release,
-	ioctl:   dahdi_tc_ioctl,
-	read:    dahdi_tc_read,
-	write:   dahdi_tc_write,
-	poll:    dahdi_tc_poll,
-	mmap:    dahdi_tc_mmap,
+	.owner =   THIS_MODULE,
+	.open =    dahdi_tc_open,
+	.release = dahdi_tc_release,
+	.ioctl =   dahdi_tc_ioctl,
+	.read =    dahdi_tc_read,
+	.write =   dahdi_tc_write,
+	.poll =    dahdi_tc_poll,
+	.mmap =    dahdi_tc_mmap,
 #if HAVE_UNLOCKED_IOCTL
-	unlocked_ioctl: dahdi_tc_unlocked_ioctl,
+	.unlocked_ioctl = dahdi_tc_unlocked_ioctl,
 #endif
 };
 
@@ -426,7 +425,7 @@
 	.minor = 250,
 };
 
-int dahdi_transcode_init(void)
+static int dahdi_transcode_init(void)
 {
 	int res;
 
@@ -444,7 +443,7 @@
 	return 0;
 }
 
-void dahdi_transcode_cleanup(void)
+static void dahdi_transcode_cleanup(void)
 {
 	dahdi_unregister_chardev(&transcode_chardev);
 

Modified: linux/trunk/drivers/dahdi/pciradio.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/pciradio.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/pciradio.c (original)
+++ linux/trunk/drivers/dahdi/pciradio.c Tue Oct 28 16:49:02 2008
@@ -465,18 +465,17 @@
 }
 
 
-void __pciradio_setcreg(struct pciradio *rad, unsigned char reg, unsigned char val)
+static void __pciradio_setcreg(struct pciradio *rad, unsigned char reg, unsigned char val)
 {
 	outb(val, rad->ioaddr + RAD_REGBASE + ((reg & 0xf) << 2));
 }
 
-unsigned char __pciradio_getcreg(struct pciradio *rad, unsigned char reg)
+static unsigned char __pciradio_getcreg(struct pciradio *rad, unsigned char reg)
 {
 	return inb(rad->ioaddr + RAD_REGBASE + ((reg & 0xf) << 2));
 }
 
-
-void rbi_out(struct pciradio *rad, int n, unsigned char *rbicmd)
+static void rbi_out(struct pciradio *rad, int n, unsigned char *rbicmd)
 {
 unsigned long flags;
 int	x;
@@ -510,7 +509,7 @@
 */
 
 
-void mx828_command(struct pciradio *rad,int channel, unsigned char command, unsigned char *byte1, unsigned char *byte2)
+static void mx828_command(struct pciradio *rad,int channel, unsigned char command, unsigned char *byte1, unsigned char *byte2)
 {
 
 	if(channel > 3)
@@ -524,7 +523,7 @@
 	
 }
 
-void mx828_command_wait(struct pciradio *rad,int channel, unsigned char command, unsigned char *byte1, unsigned char *byte2)
+static void mx828_command_wait(struct pciradio *rad,int channel, unsigned char command, unsigned char *byte1, unsigned char *byte2)
 {
 DECLARE_WAIT_QUEUE_HEAD(mywait);
 unsigned long flags;
@@ -880,8 +879,6 @@
 				/* if just getting to zero */
 				if (!(--rad->bursttimer[x]))
 				{
-					unsigned char mask = 1 << x;
-
 					rad->pasave &= ~mask;
 					__pciradio_setcreg(rad, 0xa, rad->pasave);
 				}
@@ -893,8 +890,6 @@
 				/* if just getting to zero */
 				if (!(--rad->gotrxtimer[x]))
 				{
-					unsigned char mask;
-
 					mask = 1 << (x + 4);
 					rad->pasave &= ~mask;
 					if (gotctcss) rad->pasave |= mask;
@@ -974,7 +969,7 @@
 
 	switch (cmd) {
 	case DAHDI_RADIO_GETPARAM:
-		if (copy_from_user(&stack.p,(struct dahdi_radio_param *)data,sizeof(struct dahdi_radio_param))) return -EFAULT;
+		if (copy_from_user(&stack.p, (__user void *) data, sizeof(stack.p))) return -EFAULT;
 		spin_lock_irqsave(&rad->lock,flags);
 		stack.p.data = 0; /* start with 0 value in output */
 		switch(stack.p.radpar) {
@@ -1070,10 +1065,10 @@
 			return -EINVAL;
 		}
 		spin_unlock_irqrestore(&rad->lock,flags);
-		if (copy_to_user((struct dahdi_radio_param *)data,&stack.p,sizeof(struct dahdi_radio_param))) return -EFAULT;
+		if (copy_to_user((__user void *) data, &stack.p, sizeof(stack.p))) return -EFAULT;
 		break;
 	case DAHDI_RADIO_SETPARAM:
-		if (copy_from_user(&stack.p,(struct dahdi_radio_param *)data,sizeof(struct dahdi_radio_param))) return -EFAULT;
+		if (copy_from_user(&stack.p, (__user void *) data, sizeof(stack.p))) return -EFAULT;
 		spin_lock_irqsave(&rad->lock,flags);
 		switch(stack.p.radpar) {
 		case DAHDI_RADPAR_INVERTCOR:
@@ -1349,7 +1344,7 @@
 			spin_unlock_irqrestore(&rad->lock,flags);
 			if (rad->remmode[chan->chanpos - 1] == DAHDI_RADPAR_REM_SERIAL_ASCII)
 				interruptible_sleep_on_timeout(&mywait,100);
-			if (copy_to_user((struct dahdi_radio_stat *)data,&stack.p,sizeof(struct dahdi_radio_param))) return -EFAULT;
+			if (copy_to_user((__user void *) data, &stack.p, sizeof(stack.p))) return -EFAULT;
 			return 0;
 		default:
 			spin_unlock_irqrestore(&rad->lock,flags);
@@ -1360,7 +1355,7 @@
 	case DAHDI_RADIO_GETSTAT:
 		spin_lock_irqsave(&rad->lock,flags);
 		/* start with clean object */
-		memset(&stack.s,0,sizeof(struct dahdi_radio_stat));
+		memset(&stack.s, 0, sizeof(stack.s));
 		/* if we have rx */
 		if (rad->gotrx[chan->chanpos - 1])
 		{
@@ -1406,7 +1401,7 @@
 		if (rad->gotct[chan->chanpos - 1])
 			stack.s.radstat |= DAHDI_RADSTAT_RXCT;
 		spin_unlock_irqrestore(&rad->lock,flags);
-		if (copy_to_user((struct dahdi_radio_stat *)data,&stack.s,sizeof(struct dahdi_radio_stat))) return -EFAULT;
+		if (copy_to_user((__user void *) data, &stack.s, sizeof(stack.s))) return -EFAULT;
 		break;
 	default:
 		return -ENOTTY;
@@ -1767,8 +1762,6 @@
 			pci_set_drvdata(pdev, rad);
 
 			if (pciradio_hardware_init(rad)) {
-				unsigned char x;
-
 				/* Set Reset Low */
 				x=inb(rad->ioaddr + RAD_CNTL);
 				outb((~0x1)&x, rad->ioaddr + RAD_CNTL);
@@ -1862,12 +1855,10 @@
 MODULE_DEVICE_TABLE(pci, pciradio_pci_tbl);
 
 static struct pci_driver pciradio_driver = {
-	name: 	"pciradio",
-	probe: 	pciradio_init_one,
-	remove:	__devexit_p(pciradio_remove_one),
-	suspend: NULL,
-	resume:	NULL,
-	id_table: pciradio_pci_tbl,
+	.name = "pciradio",
+	.probe = pciradio_init_one,
+	.remove = __devexit_p(pciradio_remove_one),
+	.id_table = pciradio_pci_tbl,
 };
 
 static int __init pciradio_init(void)

Modified: linux/trunk/drivers/dahdi/tor2.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/tor2.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/tor2.c (original)
+++ linux/trunk/drivers/dahdi/tor2.c Tue Oct 28 16:49:02 2008
@@ -89,13 +89,13 @@
 	int master;			/* Are we master */
 	unsigned long plx_region;	/* phy addr of PCI9030 registers */
 	unsigned long plx_len;		/* length of PLX window */
-	volatile unsigned short *plx;	/* Virtual representation of local space */
+	__iomem volatile unsigned short *plx;	/* Virtual representation of local space */
 	unsigned long xilinx32_region;	/* 32 bit Region allocated to Xilinx */
 	unsigned long xilinx32_len;	/* Length of 32 bit Xilinx region */
-	volatile unsigned int *mem32;	/* Virtual representation of 32 bit Xilinx memory area */
+	__iomem volatile unsigned int *mem32;	/* Virtual representation of 32 bit Xilinx memory area */
 	unsigned long xilinx8_region;	/* 8 bit Region allocated to Xilinx */
 	unsigned long xilinx8_len;	/* Length of 8 bit Xilinx region */
-	volatile unsigned char *mem8;	/* Virtual representation of 8 bit Xilinx memory area */
+	__iomem volatile unsigned char *mem8;	/* Virtual representation of 8 bit Xilinx memory area */
 	struct dahdi_span spans[SPANS_PER_CARD];		/* Spans */
 	struct tor2_span tspans[SPANS_PER_CARD];	/* Span data */
 	struct dahdi_chan **chans[SPANS_PER_CARD];		/* Pointers to blocks of 24(30/31) contiguous dahdi_chans for each span */
@@ -163,7 +163,7 @@
 
 #define MAX_TOR_CARDS 64
 
-struct tor2 *cards[MAX_TOR_CARDS];
+static struct tor2 *cards[MAX_TOR_CARDS];
 
 /* signalling bits */
 #define	TOR_ABIT 8
@@ -184,11 +184,11 @@
 DAHDI_IRQ_HANDLER(tor2_intr);
 
 /* translations of data channels for 24 channels in a 32 bit PCM highway */
-unsigned datxlt_t1[] = { 
+static unsigned datxlt_t1[] = { 
     1 ,2 ,3 ,5 ,6 ,7 ,9 ,10,11,13,14,15,17,18,19,21,22,23,25,26,27,29,30,31 };
 
 /* translations of data channels for 30/31 channels in a 32 bit PCM highway */
-unsigned datxlt_e1[] = { 
+static unsigned datxlt_e1[] = { 
     1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
 	25,26,27,28,29,30,31 };
 
@@ -359,7 +359,7 @@
 	int res,x,f;
 	struct tor2 *tor;
 	unsigned long endjif;
-	volatile unsigned long *gpdata_io,*lasdata_io;
+	__iomem volatile unsigned long *gpdata_io, *lasdata_io;
 	unsigned long gpdata,lasdata;
 
 	res = pci_enable_device(pdev);
@@ -436,7 +436,7 @@
 	cards[x] = tor;
 
 	/* start programming mode */
-	gpdata_io = (unsigned long *)&tor->plx[GPIOC];
+	gpdata_io = (__iomem unsigned long *) &tor->plx[GPIOC];
 	gpdata = le32_to_cpu(*gpdata_io);
 
 	gpdata |= GPIO_WRITE; /* make sure WRITE is not asserted */
@@ -508,13 +508,13 @@
 
 	/* set the LA2BRD register so that we enable block transfer, read
 	   pre-fetch, and set to maximum read pre-fetch size */
-	lasdata_io = (unsigned long *)&tor->plx[LAS2BRD];
+	lasdata_io = (__iomem unsigned long *) &tor->plx[LAS2BRD];
 	lasdata = *lasdata_io;
 	lasdata |= 0x39;
 	*lasdata_io = lasdata;
 
 	/* set the LA3BRD register so that we enable block transfer */
-	lasdata_io = (unsigned long *)&tor->plx[LAS3BRD];
+	lasdata_io = (__iomem unsigned long *) &tor->plx[LAS3BRD];
 	lasdata = *lasdata_io;
 	lasdata |= 1;
 	*lasdata_io = lasdata;
@@ -585,9 +585,9 @@
 err_out_release_plx_region:
 	release_mem_region(tor->plx_region, tor->plx_len);
 err_out_free_tor:
-	if (tor->plx) iounmap((void *)tor->plx);
-	if (tor->mem8) iounmap((void *)tor->mem8);
-	if (tor->mem32) iounmap((void *)tor->mem32);
+	if (tor->plx) iounmap(tor->plx);
+	if (tor->mem8) iounmap(tor->mem8);
+	if (tor->mem32) iounmap(tor->mem32);
 	if (tor) {
 		free_tor(tor);
 	}
@@ -619,20 +619,20 @@
 	release_mem_region(tor->plx_region, tor->plx_len);
 	release_mem_region(tor->xilinx32_region, tor->xilinx32_len);
 	release_mem_region(tor->xilinx8_region, tor->xilinx8_len);
-	if (tor->plx) iounmap((void *)tor->plx);
-	if (tor->mem8) iounmap((void *)tor->mem8);
-	if (tor->mem32) iounmap((void *)tor->mem32);
-
-	cards[tor->num] = 0;
+	if (tor->plx) iounmap(tor->plx);
+	if (tor->mem8) iounmap(tor->mem8);
+	if (tor->mem32) iounmap(tor->mem32);
+
+	cards[tor->num] = NULL;
 	pci_set_drvdata(pdev, NULL);
 	free_tor(tor);
 }
 
 static struct pci_driver tor2_driver = {
-	name: "tormenta2",
-	probe: tor2_probe,
-	remove: __devexit_p(tor2_remove),
-	id_table: tor2_pci_ids,
+	.name = "tormenta2",
+	.probe = tor2_probe,
+	.remove = __devexit_p(tor2_remove),
+	.id_table = tor2_pci_ids,
 };
 
 static int __init tor2_init(void) {
@@ -1180,7 +1180,7 @@
 
 DAHDI_IRQ_HANDLER(tor2_intr)
 {
-	int n, i, j, k, syncsrc;
+	int n, i, j, k, newsyncsrc;
 	unsigned int rxword,txword;
 
 	unsigned char c, rxc;
@@ -1427,7 +1427,7 @@
 	if (!timingcable) {
 		/* re-evaluate active sync src (no cable version) */
 		tor->syncsrc = 0;
-		syncsrc = 0;
+		newsyncsrc = 0;
 		  /* if primary sync specified, see if we can use it */
 		if (tor->psyncs[0])
 		   {
@@ -1435,7 +1435,7 @@
 			if (!(tor->spans[tor->psyncs[0] - 1].alarms & (DAHDI_ALARM_RED | DAHDI_ALARM_BLUE | 
 				DAHDI_ALARM_LOOPBACK))) {
 					tor->syncsrc = tor->psyncs[0];
-					syncsrc = tor->syncs[0];
+					newsyncsrc = tor->syncs[0];
 					}
 		   }
 		  /* if any others specified, see if we can use them */
@@ -1446,12 +1446,12 @@
 				if (!(tor->spans[tor->psyncs[i] - 1].alarms & (DAHDI_ALARM_RED | DAHDI_ALARM_BLUE | 
 					DAHDI_ALARM_LOOPBACK))) {
 						tor->syncsrc = tor->psyncs[i];
-						syncsrc = tor->syncs[i];
+						newsyncsrc = tor->syncs[i];
 						}
 			}
 		}
 		/* update sync src info */
-		for (i = 0; i < SPANS_PER_CARD; i++) tor->spans[i].syncsrc = syncsrc;
+		for (i = 0; i < SPANS_PER_CARD; i++) tor->spans[i].syncsrc = newsyncsrc;
 
 		/* actually set the sync register */
 		tor->mem8[SYNCREG] = tor->syncsrc;

Modified: linux/trunk/drivers/dahdi/voicebus.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/voicebus.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus.c (original)
+++ linux/trunk/drivers/dahdi/voicebus.c Tue Oct 28 16:49:02 2008
@@ -971,7 +971,7 @@
 	VBUNLOCK(vb);
 }
 
-unsigned long
+static unsigned long
 vb_wait_for_completion_timeout(struct completion *x, unsigned long timeout)
 {
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
@@ -1061,7 +1061,7 @@
 	kfree(vb);
 }
 
-void
+static void
 __vb_increase_latency(struct voicebus *vb) 
 {
 	static int __warn_once = 1;

Propchange: linux/trunk/drivers/dahdi/wcb4xxp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 28 16:49:02 2008
@@ -1,0 +1,3 @@
+*.ko
+.*.cmd
+*.mod.c

Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Tue Oct 28 16:49:02 2008
@@ -109,9 +109,10 @@
 static struct devtype wcb4xxp = { "Wildcard B410P", 0 };
 
 
-const char *wcb4xxp_rcsdata = "$RCSfile: base.c,v $ $Revision$";
-const char *build_stamp = "" __DATE__ " " __TIME__ "";
-
+#if 0
+static const char *wcb4xxp_rcsdata = "$RCSfile: base.c,v $ $Revision$";
+static const char *build_stamp = "" __DATE__ " " __TIME__ "";
+#endif
 
 /*
  * lowlevel PCI access functions
@@ -1582,7 +1583,8 @@
 static int hdlc_tx_frame(struct b4xxp_span *bspan)
 {
 	struct b4xxp *b4 = bspan->parent;
-	int res, i, fifo, size=32;
+	int res, i, fifo;
+	unsigned int size = 32;
 	int z1, z2, zlen;
 	unsigned char buf[32];
 	unsigned long irq_flags;
@@ -2286,7 +2288,7 @@
 
 /********************************************************************************* proc stuff *****/
 
-int b4xxp_proc_read_one(char *buf, struct b4xxp *b4)
+static int b4xxp_proc_read_one(char *buf, struct b4xxp *b4)
 {
 	struct dahdi_chan *chan;
 	int len, i, j;
@@ -2332,7 +2334,7 @@
 	return len;
 }
 
-int b4xxp_proc_read(char *buf, char **start, off_t offset, int count, int *eof, void *data)
+static int b4xxp_proc_read(char *buf, char **start, off_t offset, int count, int *eof, void *data)
 {
 	struct b4xxp **b4_cards = data;
 	char sBuf[256];
@@ -2601,12 +2603,10 @@
 };
 
 static struct pci_driver b4xx_driver = {
-	name:		"wcb4xxp",
-	probe:		b4xx_probe,
-	remove:		__devexit_p(b4xxp_remove),
-	suspend:	NULL,
-	resume:		NULL,
-	id_table:	b4xx_ids,
+	.name = "wcb4xxp",
+	.probe = b4xx_probe,
+	.remove = __devexit_p(b4xxp_remove),
+	.id_table = b4xx_ids,
 };
 
 static int __init b4xx_init(void)

Modified: linux/trunk/drivers/dahdi/wcfxo.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wcfxo.c (original)
+++ linux/trunk/drivers/dahdi/wcfxo.c Tue Oct 28 16:49:02 2008
@@ -1026,10 +1026,10 @@
 MODULE_DEVICE_TABLE (pci, wcfxo_pci_tbl);
 
 static struct pci_driver wcfxo_driver = {
-	name: 	"wcfxo",
-	probe: 	wcfxo_init_one,
-	remove:	__devexit_p(wcfxo_remove_one),
-	id_table: wcfxo_pci_tbl,
+	.name = "wcfxo",
+	.probe = wcfxo_init_one,
+	.remove = __devexit_p(wcfxo_remove_one),
+	.id_table = wcfxo_pci_tbl,
 };
 
 static int __init wcfxo_init(void)

Modified: linux/trunk/drivers/dahdi/wct1xxp.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wct1xxp.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wct1xxp.c (original)
+++ linux/trunk/drivers/dahdi/wct1xxp.c Tue Oct 28 16:49:02 2008
@@ -165,7 +165,7 @@
 
 #define CANARY 0xca1e
 
-int debug = 0;   /* doesnt do anything */
+static int debug = 0;   /* doesnt do anything */
 
 static struct t1xxp *cards[WC_MAX_CARDS];
 
@@ -1400,12 +1400,12 @@
 MODULE_DEVICE_TABLE(pci,t1xxp_pci_tbl);
 
 static struct pci_driver t1xxp_driver = {
-	name: 	"t1xxp",
-	probe: 	t1xxp_init_one,
-	remove:	__devexit_p(t1xxp_remove_one),
-	suspend: NULL,
-	resume:	NULL,
-	id_table: t1xxp_pci_tbl,
+	.name =	"t1xxp",
+	.probe = t1xxp_init_one,
+	.remove = __devexit_p(t1xxp_remove_one),
+	.suspend = NULL,
+	.resume = NULL,
+	. id_table = t1xxp_pci_tbl,
 };
 
 static int __init t1xxp_init(void)

Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Tue Oct 28 16:49:02 2008
@@ -327,7 +327,7 @@
 	dma_addr_t	writedma;
 	unsigned long memaddr;		/* Base address of card */
 	unsigned long memlen;
-	volatile unsigned int *membase;	/* Base address of card */
+	__iomem volatile unsigned int *membase;	/* Base address of card */
 
 	/* Add this for our softlockup protector */
 	unsigned int oct_rw_count;
@@ -1155,12 +1155,12 @@
 			regs.pci[x] = t4_pci_in(wc, x);
 		for (x=0;x<NUM_REGS;x++)
 			regs.regs[x] = t4_framer_in(wc, chan->span->offset, x);
-		if (copy_to_user((struct t4_regs *)data, &regs, sizeof(regs)))
+		if (copy_to_user((__user void *) data, &regs, sizeof(regs)))
 			return -EFAULT;
 		break;
 #ifdef VPM_SUPPORT
 	case DAHDI_TONEDETECT:
-		if (get_user(j, (int *)data))
+		if (get_user(j, (__user int *) data))
 			return -EFAULT;
 		if (!wc->vpm)
 			return -ENOSYS;
@@ -1191,7 +1191,8 @@
 
 static void inline t4_hdlc_xmit_fifo(struct t4 *wc, unsigned int span, struct t4_span *ts)
 {
-	int res, i, size = 32;
+	int res, i;
+	unsigned int size = 32;
 	unsigned char buf[32];
 
 	res = dahdi_hdlc_getbuf(ts->sigchan, buf, &size);
@@ -3796,12 +3797,10 @@
 };
 
 static struct pci_driver t4_driver = {
-	name: 	"wct4xxp",
-	probe: 	t4_init_one,
-	remove:	__devexit_p(t4_remove_one),
-	suspend: NULL,
-	resume:	NULL,
-	id_table: t4_pci_tbl,
+	.name = "wct4xxp",
+	.probe = t4_init_one,
+	.remove = __devexit_p(t4_remove_one),
+	.id_table = t4_pci_tbl,
 };
 
 static int __init t4_init(void)

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Tue Oct 28 16:49:02 2008
@@ -109,8 +109,8 @@
 #define DTE_DEBUG_NETWORK_IF       (1 << 5) /* 32 */
 #define DTE_DEBUG_NETWORK_EARLY    (1 << 6) /* 64 */
 
-int debug;
-char *mode;
+static int debug;
+static char *mode;
 
 static spinlock_t wctc4xxp_list_lock;
 static struct list_head wctc4xxp_list;
@@ -366,11 +366,11 @@
 kmem_cache_t *cmd_cache;
 #else
 /*! Used to allocate commands to submit to the dte. */
-struct kmem_cache *cmd_cache;
+static struct kmem_cache *cmd_cache;
 #endif
 
 static inline struct tcb *
-__alloc_cmd(unsigned alloc_flags, unsigned long cmd_flags)
+__alloc_cmd(gfp_t alloc_flags, unsigned long cmd_flags)
 {
 	struct tcb *cmd;
 
@@ -506,13 +506,13 @@
 #define wctc4xxp_send_cmd(wc, command) ({                                         \
 	int __res;                                                           \
 	u8 _cmd[] = command;                                                 \
-	struct tcb *cmd;                                                 \
-	if (!(cmd=__alloc_cmd(GFP_KERNEL, WAIT_FOR_RESPONSE)))               \
+	struct tcb *__cmd;                                                 \
+	if (!(__cmd=__alloc_cmd(GFP_KERNEL, WAIT_FOR_RESPONSE)))               \
 		return -ENOMEM;                                              \
 	BUG_ON(sizeof(_cmd) > SFRAME_SIZE);                                  \
-	memcpy(cmd->data, _cmd, sizeof(_cmd));                               \
-	cmd->data_len = sizeof(_cmd);                                        \
-	__res = __wctc4xxp_send_cmd(wc, cmd);                                     \
+	memcpy(__cmd->data, _cmd, sizeof(_cmd));                               \
+	__cmd->data_len = sizeof(_cmd);                                        \
+	__res = __wctc4xxp_send_cmd(wc, __cmd);                                     \
 	__res;                                                               \
 })
 #define wctc4xxp_create_cmd(wc, command) ({                                       \
@@ -582,7 +582,7 @@
 static struct tcb *
 wctc4xxp_skb_to_cmd(struct wcdte *wc, const struct sk_buff *skb)
 {
-	const unsigned long alloc_flags = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
+	const gfp_t alloc_flags = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
 	struct tcb *cmd;
 	/* const static char dev_mac[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55}; */
 	if ((cmd = __alloc_cmd(alloc_flags, 0))) {
@@ -993,7 +993,7 @@
 #define OWNED(_d_) (((_d_)->des0)&OWN_BIT)
 #define SET_OWNED(_d_) do { wmb(); (_d_)->des0 |= OWN_BIT; wmb();} while (0)
 
-const unsigned int BUFFER1_SIZE_MASK = 0x7ff;
+static const unsigned int BUFFER1_SIZE_MASK = 0x7ff;
 
 static int 
 wctc4xxp_submit(struct wctc4xxp_descriptor_ring* dr, struct tcb *c)
@@ -1158,7 +1158,7 @@
 	cmd->data_len = sizeof(*c);
 }
 
-struct tcb * 
+static struct tcb * 
 wctc4xxp_create_channel_cmd(struct wcdte *wc, u16 timeslot)
 {
 	struct tcb *cmd;
@@ -1169,7 +1169,7 @@
 	return cmd;
 }
 
-void 
+static void 
 __wctc4xxp_create_set_arm_clk_cmd(struct wcdte *wc, struct tcb *cmd)
 {
 	struct csm_encaps_hdr *hdr = cmd->data;
@@ -1191,7 +1191,7 @@
 	return;
 }
 
-struct tcb *
+static struct tcb *
 wctc4xxp_create_rtp_cmd(struct wcdte *wc, struct dahdi_transcoder_channel *dtc, size_t inbytes)
 {
 	const struct channel_pvt *cpvt = dtc->pvt;
@@ -3245,15 +3245,13 @@
 MODULE_DEVICE_TABLE(pci, wctc4xxp_pci_tbl);
 
 static struct pci_driver wctc4xxp_driver = {
-	name: 	"wctc4xxp",
-	probe: 	wctc4xxp_init_one,
-	remove:	__devexit_p(wctc4xxp_remove_one),
-	suspend: NULL,
-	resume:	NULL,
-	id_table: wctc4xxp_pci_tbl,
+	.name = "wctc4xxp",
+	.probe = wctc4xxp_init_one,
+	.remove = __devexit_p(wctc4xxp_remove_one),
+	.id_table = wctc4xxp_pci_tbl,
 };
 
-int __init wctc4xxp_init(void)
+static int __init wctc4xxp_init(void)
 {
 	int res;
 #	if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
@@ -3275,7 +3273,7 @@
 	return 0;
 }
 
-void __exit wctc4xxp_cleanup(void)
+static void __exit wctc4xxp_cleanup(void)
 {
 	pci_unregister_driver(&wctc4xxp_driver);
 	kmem_cache_destroy(cmd_cache);

Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Tue Oct 28 16:49:02 2008
@@ -1791,7 +1791,7 @@
 	case DAHDI_ONHOOKTRANSFER:
 		if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS)
 			return -EINVAL;
-		if (get_user(x, (int *)data))
+		if (get_user(x, (__user int *) data))
 			return -EFAULT;
 		wc->mod[chan->chanpos - 1].fxs.ohttimer = x << 3;
 		if (reversepolarity)
@@ -1808,7 +1808,7 @@
 		}
 		break;
 	case DAHDI_SETPOLARITY:
-		if (get_user(x, (int *)data))
+		if (get_user(x, (__user int *) data))
 			return -EFAULT;
 		if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS)
 			return -EINVAL;
@@ -1834,7 +1834,7 @@
 			stats.batvolt = (signed char)wctdm_getreg(wc, chan->chanpos - 1, 29) * 1000;
 		} else 
 			return -EINVAL;
-		if (copy_to_user((struct wctdm_stats *)data, &stats, sizeof(stats)))
+		if (copy_to_user((__user void *)data, &stats, sizeof(stats)))
 			return -EFAULT;
 		break;
 	case WCTDM_GET_REGS:
@@ -1848,11 +1848,11 @@
 			for (x=0;x<NUM_FXO_REGS;x++)
 				regs.direct[x] = wctdm_getreg(wc, chan->chanpos - 1, x);
 		}
-		if (copy_to_user((struct wctdm_regs *)data, &regs, sizeof(regs)))
+		if (copy_to_user((__user void *)data, &regs, sizeof(regs)))
 			return -EFAULT;
 		break;
 	case WCTDM_SET_REG:
-		if (copy_from_user(&regop, (struct wctdm_regop *)data, sizeof(regop)))
+		if (copy_from_user(&regop, (__user void *) data, sizeof(regop)))
 			return -EFAULT;
 		if (regop.indirect) {
 			if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS)
@@ -1867,7 +1867,7 @@
 		break;
 	case WCTDM_SET_ECHOTUNE:
 		printk(KERN_INFO "-- Setting echo registers: \n");
-		if (copy_from_user(&echoregs, (struct wctdm_echo_coefs*)data, sizeof(echoregs)))
+		if (copy_from_user(&echoregs, (__user void *)data, sizeof(echoregs)))
 			return -EFAULT;
 
 		if (wc->modtype[chan->chanpos - 1] == MOD_TYPE_FXO) {
@@ -1893,7 +1893,7 @@
 		}
 		break;
 	case DAHDI_SET_HWGAIN:
-		if (copy_from_user(&hwgain, (struct dahdi_hwgain*) data, sizeof(hwgain)))
+		if (copy_from_user(&hwgain, (__user void *) data, sizeof(hwgain)))
 			return -EFAULT;
 
 		wctdm_set_hwgain(wc, chan->chanpos-1, hwgain.newgain, hwgain.tx);
@@ -2322,8 +2322,6 @@
 
 
 			if (wctdm_hardware_init(wc)) {
-				unsigned char x;
-
 				/* Set Reset Low */
 				x=inb(wc->ioaddr + WC_CNTL);
 				outb((~0x1)&x, wc->ioaddr + WC_CNTL);
@@ -2420,12 +2418,12 @@
 MODULE_DEVICE_TABLE(pci, wctdm_pci_tbl);
 
 static struct pci_driver wctdm_driver = {
-	name: 	"wctdm",
-	probe: 	wctdm_init_one,
-	remove:	__devexit_p(wctdm_remove_one),
-	suspend: NULL,
-	resume:	NULL,
-	id_table: wctdm_pci_tbl,
+	.name = "wctdm",
+	.probe = wctdm_init_one,
+	.remove =__devexit_p(wctdm_remove_one),
+	.suspend = NULL,
+	.resume = NULL,
+	.id_table = wctdm_pci_tbl,
 };
 
 static int __init wctdm_init(void)

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c Tue Oct 28 16:49:02 2008
@@ -1265,7 +1265,7 @@
     *pFramingError3Count = ReadBuffer[2];
     *pDmaStopErrorCount  = ReadBuffer[3];
     
-    if(pDmaSlipStatsBuffer != 0) 
+    if(pDmaSlipStatsBuffer != NULL) 
     // If users want to get the DMA slips count
     {
 	    pDmaSlipStatsBuffer[0] = ReadBuffer[4];

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c Tue Oct 28 16:49:02 2008
@@ -133,8 +133,8 @@
 	return ret;
 }
 
-int wctdm_vpm150m_getreg_full_async(struct wctdm *wc, int pagechange, unsigned int len, 
-	unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
+static int wctdm_vpm150m_getreg_full_async(struct wctdm *wc, int pagechange, unsigned int len, 
+					   unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
 {
 	int ret=0;
 	unsigned long flags;
@@ -157,8 +157,8 @@
 	return ret;
 }
 
-int wctdm_vpm150m_getreg_full_return(struct wctdm *wc, int pagechange, unsigned int len,
-	unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
+static int wctdm_vpm150m_getreg_full_return(struct wctdm *wc, int pagechange, unsigned int len,
+					    unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
 {
 	int ret = 0;
 	unsigned long flags;
@@ -184,9 +184,9 @@
 	return ret;
 }
 
-int wctdm_vpm150m_getreg_full(struct wctdm *wc, int pagechange, unsigned int len, unsigned short addr, unsigned short *outbuf)
-{
-	struct vpm150m_cmd *hit = 0;
+static int wctdm_vpm150m_getreg_full(struct wctdm *wc, int pagechange, unsigned int len, unsigned short addr, unsigned short *outbuf)
+{
+	struct vpm150m_cmd *hit = NULL;
 	int ret = 0;
 	do {
 		ret = wctdm_vpm150m_getreg_full_async(wc, pagechange, len, addr, outbuf, &hit);
@@ -202,7 +202,7 @@
 	return ret;
 }
 
-int wctdm_vpm150m_setreg_full(struct wctdm *wc, int pagechange, unsigned int len, unsigned int addr, unsigned short *data)
+static int wctdm_vpm150m_setreg_full(struct wctdm *wc, int pagechange, unsigned int len, unsigned int addr, unsigned short *data)
 {
 	unsigned long flags;
 	struct vpm150m_cmd *hit;
@@ -293,7 +293,7 @@
 
 	vpm150m_io_wait(wc);
 	if ( NumWords < VPM150M_MAX_COMMANDS ) {
-		struct vpm150m_cmd* cmds[VPM150M_MAX_COMMANDS] = {0};
+		struct vpm150m_cmd* cmds[VPM150M_MAX_COMMANDS] = { NULL };
 		wctdm_vpm150m_setpage(wc, DspAddress >> 16);
 		DspAddress &= 0xffff;
 		for (i=0; i < NumWords; ++i) {

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=5162&r1=5161&r2=5162
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)

[... 353 lines stripped ...]



More information about the svn-commits mailing list