diff options
Diffstat (limited to 'drivers/dahdi/xpp/dahdi_debug.c')
-rw-r--r-- | drivers/dahdi/xpp/dahdi_debug.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/dahdi/xpp/dahdi_debug.c b/drivers/dahdi/xpp/dahdi_debug.c index 6c9d052..1f0775a 100644 --- a/drivers/dahdi/xpp/dahdi_debug.c +++ b/drivers/dahdi/xpp/dahdi_debug.c @@ -22,7 +22,7 @@ #include <linux/version.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) -# warning "This module is tested only with 2.6 kernels" +#warning "This module is tested only with 2.6 kernels" #endif #include <linux/kernel.h> @@ -35,28 +35,20 @@ static const char rcsid[] = "$Id$"; #define P_(x) [ x ] = { .value = x, .name = #x, } -static struct { +static struct { int value; char *name; } poll_names[] = { - P_(POLLIN), - P_(POLLPRI), - P_(POLLOUT), - P_(POLLERR), - P_(POLLHUP), - P_(POLLNVAL), - P_(POLLRDNORM), - P_(POLLRDBAND), - P_(POLLWRNORM), - P_(POLLWRBAND), - P_(POLLMSG), - P_(POLLREMOVE) + P_(POLLIN), P_(POLLPRI), P_(POLLOUT), P_(POLLERR), P_(POLLHUP), + P_(POLLNVAL), P_(POLLRDNORM), P_(POLLRDBAND), P_(POLLWRNORM), + P_(POLLWRBAND), P_(POLLMSG), P_(POLLREMOVE) }; + #undef P_ void dump_poll(int debug, const char *msg, int poll) { - int i; + int i; for (i = 0; i < ARRAY_SIZE(poll_names); i++) { if (poll & poll_names[i].value) @@ -66,10 +58,10 @@ void dump_poll(int debug, const char *msg, int poll) void alarm2str(int alarm, char *buf, int buflen) { - char *p = buf; - int left = buflen; - int i; - int n; + char *p = buf; + int left = buflen; + int i; + int n; if (!alarm) { snprintf(buf, buflen, "NONE"); @@ -83,7 +75,7 @@ void alarm2str(int alarm, char *buf, int buflen) left -= n; } } - if (p > buf) /* kill last comma */ + if (p > buf) /* kill last comma */ *(p - 1) = '\0'; } |