[dahdi-commits] tzafrir: linux/trunk r10423 - /linux/trunk/drivers/dahdi/xpp/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Jan 11 09:17:45 CST 2012
Author: tzafrir
Date: Wed Jan 11 09:17:42 2012
New Revision: 10423
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10423
Log:
xpp: style - Remove 0/NULL static initializers
* Applied via:
perl -pi -e 's/(\bstatic\b[^=]*?)\s*=\s*(0|NULL)\s*;/$1;/' "$@"
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/xpp/card_fxs.c
linux/trunk/drivers/dahdi/xpp/parport_debug.c
linux/trunk/drivers/dahdi/xpp/xbus-core.c
linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
linux/trunk/drivers/dahdi/xpp/xframe_queue.c
linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
linux/trunk/drivers/dahdi/xpp/xpp_usb.c
linux/trunk/drivers/dahdi/xpp/xproto.c
Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Wed Jan 11 09:17:42 2012
@@ -984,7 +984,7 @@
if (get_user(val, (int __user *)arg))
return -EFAULT;
if(!vmwi_ioctl) {
- static bool notified = 0;
+ static bool notified;
if(!notified++)
LINE_NOTICE(xpd, pos,
Modified: linux/trunk/drivers/dahdi/xpp/parport_debug.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/parport_debug.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/parport_debug.c (original)
+++ linux/trunk/drivers/dahdi/xpp/parport_debug.c Wed Jan 11 09:17:42 2012
@@ -30,7 +30,7 @@
#include <linux/parport.h>
#include "parport_debug.h"
-static struct parport *debug_sync_parport = NULL;
+static struct parport *debug_sync_parport;
static int parport_toggles[8]; /* 8 bit flip-flop */
void flip_parport_bit(unsigned char bitnum)
Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Wed Jan 11 09:17:42 2012
@@ -73,7 +73,7 @@
/* Data structures */
static DEFINE_SPINLOCK(xbuses_lock);
#ifdef CONFIG_PROC_FS
-static struct proc_dir_entry *proc_xbuses = NULL;
+static struct proc_dir_entry *proc_xbuses;
#endif
static struct xbus_desc {
Modified: linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-pcm.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-pcm.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-pcm.c Wed Jan 11 09:17:42 2012
@@ -54,10 +54,10 @@
* The ref_ticker points to the current referece tick source.
* I.e: one of our AB or dahdi_ticker
*/
-static struct xpp_ticker *ref_ticker = NULL;
+static struct xpp_ticker *ref_ticker;
static DEFINE_SPINLOCK(ref_ticker_lock);
static DEFINE_SPINLOCK(elect_syncer_lock);
-static bool force_dahdi_sync = 0; /* from /sys/bus/astribanks/drivers/xppdrv/sync */
+static bool force_dahdi_sync; /* from /sys/bus/astribanks/drivers/xppdrv/sync */
static xbus_t *global_ticker;
static struct xpp_ticker global_ticks_series;
@@ -80,7 +80,7 @@
#define SYNC_ADJ_SLOW 10000
#ifdef DAHDI_SYNC_TICK
-static unsigned int dahdi_tick_count = 0;
+static unsigned int dahdi_tick_count;
#endif
/*------------------------- SYNC Handling --------------------------*/
@@ -795,7 +795,7 @@
/* FRAMES: include opcode in calculation */
good_len = RPACKET_HEADERSIZE + sizeof(xpp_line_t) + count * 8;
if(XPACKET_LEN(pack) != good_len) {
- static int rate_limit = 0;
+ static int rate_limit;
XPD_COUNTER(xpd, RECV_ERRORS)++;
if((rate_limit++ % 1000) <= 10) {
Modified: linux/trunk/drivers/dahdi/xpp/xframe_queue.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xframe_queue.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xframe_queue.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xframe_queue.c Wed Jan 11 09:17:42 2012
@@ -48,7 +48,7 @@
static bool __xframe_enqueue(struct xframe_queue *q, xframe_t *xframe)
{
int ret = 1;
- static int overflow_cnt = 0;
+ static int overflow_cnt;
if(unlikely(q->disabled)) {
ret = 0;
Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Wed Jan 11 09:17:42 2012
@@ -836,7 +836,7 @@
*/
static int xpp_watchdog(struct dahdi_span *span, int cause)
{
- static int rate_limit = 0;
+ static int rate_limit;
if((rate_limit++ % 1000) == 0)
DBG(GENERAL, "\n");
Modified: linux/trunk/drivers/dahdi/xpp/xpp_usb.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_usb.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_usb.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_usb.c Wed Jan 11 09:17:42 2012
@@ -167,7 +167,7 @@
#define MAX_PENDING_WRITES 100
-static KMEM_CACHE_T *xusb_cache = NULL;
+static KMEM_CACHE_T *xusb_cache;
typedef struct xusb xusb_t;
@@ -243,7 +243,7 @@
static DEFINE_SPINLOCK(xusb_lock);
static xusb_t *xusb_array[MAX_BUSES] = {};
-static unsigned bus_count = 0;
+static unsigned bus_count;
/* prevent races between open() and disconnect() */
Modified: linux/trunk/drivers/dahdi/xpp/xproto.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xproto.c?view=diff&rev=10423&r1=10422&r2=10423
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xproto.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xproto.c Wed Jan 11 09:17:42 2012
@@ -317,7 +317,7 @@
printk(" BYTES: ");
for(i = 0; i < XPACKET_LEN(packet); i++) {
- static int limiter = 0;
+ static int limiter;
if(i >= sizeof(xpacket_t)) {
if(limiter < ERR_REPORT_LIMIT) {
More information about the dahdi-commits
mailing list