Commit 085e897b authored by Jeff Garzik's avatar Jeff Garzik

Fix more IrDA __FUNCTION__ breakage. It now builds, yay.

parent f34544db
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#undef IRDA_DEBUG #undef IRDA_DEBUG
#define IRDA_DEBUG(n, args...) (printk(KERN_DEBUG args)) #define IRDA_DEBUG(n, args...) (printk(KERN_DEBUG args))
#undef ASSERT(expr, func) #undef ASSERT
#define ASSERT(expr, func) \ #define ASSERT(expr, func) \
if(!(expr)) { \ if(!(expr)) { \
printk( "Assertion failed! %s,%s,%s,line=%d\n",\ printk( "Assertion failed! %s,%s,%s,line=%d\n",\
...@@ -86,13 +86,13 @@ static struct dongle_reg dongle = { ...@@ -86,13 +86,13 @@ static struct dongle_reg dongle = {
int __init ma600_init(void) int __init ma600_init(void)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
return irda_device_register_dongle(&dongle); return irda_device_register_dongle(&dongle);
} }
void __exit ma600_cleanup(void) void __exit ma600_cleanup(void)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
irda_device_unregister_dongle(&dongle); irda_device_unregister_dongle(&dongle);
} }
...@@ -105,7 +105,7 @@ void __exit ma600_cleanup(void) ...@@ -105,7 +105,7 @@ void __exit ma600_cleanup(void)
*/ */
static void ma600_open(dongle_t *self, struct qos_info *qos) static void ma600_open(dongle_t *self, struct qos_info *qos)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
qos->baud_rate.bits &= IR_2400|IR_9600|IR_19200|IR_38400 qos->baud_rate.bits &= IR_2400|IR_9600|IR_19200|IR_38400
|IR_57600|IR_115200; |IR_57600|IR_115200;
...@@ -123,7 +123,7 @@ static void ma600_open(dongle_t *self, struct qos_info *qos) ...@@ -123,7 +123,7 @@ static void ma600_open(dongle_t *self, struct qos_info *qos)
static void ma600_close(dongle_t *self) static void ma600_close(dongle_t *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
/* Power off dongle */ /* Power off dongle */
self->set_dtr_rts(self->dev, FALSE, FALSE); self->set_dtr_rts(self->dev, FALSE, FALSE);
...@@ -184,12 +184,12 @@ static int ma600_change_speed(struct irda_task *task) ...@@ -184,12 +184,12 @@ static int ma600_change_speed(struct irda_task *task)
__u8 byte_echo; __u8 byte_echo;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(task != NULL, return -1;); ASSERT(task != NULL, return -1;);
if (self->speed_task && self->speed_task != task) { if (self->speed_task && self->speed_task != task) {
IRDA_DEBUG(0, __FUNCTION__ "(), busy!\n"); IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__);
return MSECS_TO_JIFFIES(10); return MSECS_TO_JIFFIES(10);
} else { } else {
self->speed_task = task; self->speed_task = task;
...@@ -215,7 +215,7 @@ static int ma600_change_speed(struct irda_task *task) ...@@ -215,7 +215,7 @@ static int ma600_change_speed(struct irda_task *task)
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ "(), resetting dongle timed out!\n"); WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__);
ret = -1; ret = -1;
break; break;
...@@ -246,7 +246,7 @@ static int ma600_change_speed(struct irda_task *task) ...@@ -246,7 +246,7 @@ static int ma600_change_speed(struct irda_task *task)
if(byte != byte_echo) { if(byte != byte_echo) {
/* if control byte != echo, I don't know what to do */ /* if control byte != echo, I don't know what to do */
printk(KERN_WARNING __FUNCTION__ "() control byte written != read!\n"); printk(KERN_WARNING "%s() control byte written != read!\n", __FUNCTION__);
printk(KERN_WARNING "control byte = 0x%c%c\n", printk(KERN_WARNING "control byte = 0x%c%c\n",
hexTbl[(byte>>4)&0x0f], hexTbl[byte&0x0f]); hexTbl[(byte>>4)&0x0f], hexTbl[byte&0x0f]);
printk(KERN_WARNING "byte echo = 0x%c%c\n", printk(KERN_WARNING "byte echo = 0x%c%c\n",
...@@ -254,7 +254,7 @@ static int ma600_change_speed(struct irda_task *task) ...@@ -254,7 +254,7 @@ static int ma600_change_speed(struct irda_task *task)
hexTbl[byte_echo & 0x0f]); hexTbl[byte_echo & 0x0f]);
#ifndef NDEBUG #ifndef NDEBUG
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ "() control byte write read OK\n"); IRDA_DEBUG(2, "%s() control byte write read OK\n", __FUNCTION__);
#endif #endif
} }
...@@ -273,7 +273,7 @@ static int ma600_change_speed(struct irda_task *task) ...@@ -273,7 +273,7 @@ static int ma600_change_speed(struct irda_task *task)
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->speed_task = NULL; self->speed_task = NULL;
ret = -1; ret = -1;
...@@ -298,12 +298,12 @@ int ma600_reset(struct irda_task *task) ...@@ -298,12 +298,12 @@ int ma600_reset(struct irda_task *task)
dongle_t *self = (dongle_t *) task->instance; dongle_t *self = (dongle_t *) task->instance;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(task != NULL, return -1;); ASSERT(task != NULL, return -1;);
if (self->reset_task && self->reset_task != task) { if (self->reset_task && self->reset_task != task) {
IRDA_DEBUG(0, __FUNCTION__ "(), busy!\n"); IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__);
return MSECS_TO_JIFFIES(10); return MSECS_TO_JIFFIES(10);
} else } else
self->reset_task = task; self->reset_task = task;
...@@ -326,7 +326,7 @@ int ma600_reset(struct irda_task *task) ...@@ -326,7 +326,7 @@ int ma600_reset(struct irda_task *task)
self->reset_task = NULL; self->reset_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->reset_task = NULL; self->reset_task = NULL;
ret = -1; ret = -1;
......
...@@ -509,7 +509,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid) ...@@ -509,7 +509,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
notify_t notify; notify_t notify;
if (self->lsap) { if (self->lsap) {
WARNING(__FUNCTION__ "(), busy!\n"); WARNING("%s(), busy!\n", __FUNCTION__);
return -EBUSY; return -EBUSY;
} }
...@@ -521,7 +521,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid) ...@@ -521,7 +521,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid); self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid);
if (self->lsap == NULL) { if (self->lsap == NULL) {
IRDA_DEBUG( 0, __FUNCTION__ "(), Unable to allocate LSAP!\n"); IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -542,12 +542,12 @@ static int irda_open_lsap(struct irda_sock *self, int pid) ...@@ -542,12 +542,12 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
*/ */
static int irda_find_lsap_sel(struct irda_sock *self, char *name) static int irda_find_lsap_sel(struct irda_sock *self, char *name)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(%p, %s)\n", self, name); IRDA_DEBUG(2, "%s(%p, %s)\n", __FUNCTION__, self, name);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
if (self->iriap) { if (self->iriap) {
WARNING("%s: busy with a previous query\n", __FUNCTION__); WARNING("%s(): busy with a previous query\n", __FUNCTION__);
return -EBUSY; return -EBUSY;
} }
...@@ -582,8 +582,8 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) ...@@ -582,8 +582,8 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
/* Get the remote TSAP selector */ /* Get the remote TSAP selector */
switch (self->ias_result->type) { switch (self->ias_result->type) {
case IAS_INTEGER: case IAS_INTEGER:
IRDA_DEBUG(4, __FUNCTION__ "() int=%d\n", IRDA_DEBUG(4, "%s() int=%d\n",
self->ias_result->t.integer); __FUNCTION__, self->ias_result->t.integer);
if (self->ias_result->t.integer != -1) if (self->ias_result->t.integer != -1)
self->dtsap_sel = self->ias_result->t.integer; self->dtsap_sel = self->ias_result->t.integer;
...@@ -592,7 +592,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) ...@@ -592,7 +592,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
break; break;
default: default:
self->dtsap_sel = 0; self->dtsap_sel = 0;
IRDA_DEBUG(0, __FUNCTION__ "(), bad type!\n"); IRDA_DEBUG(0, "%s(), bad type!\n", __FUNCTION__);
break; break;
} }
if (self->ias_result) if (self->ias_result)
...@@ -630,7 +630,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -630,7 +630,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
__u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */
__u8 dtsap_sel = 0x0; /* TSAP associated with it */ __u8 dtsap_sel = 0x0; /* TSAP associated with it */
IRDA_DEBUG(2, __FUNCTION__ "(), name=%s\n", name); IRDA_DEBUG(2, "%s(), name=%s\n", __FUNCTION__, name);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -652,8 +652,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -652,8 +652,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
/* Try the address in the log */ /* Try the address in the log */
self->daddr = discoveries[i].daddr; self->daddr = discoveries[i].daddr;
self->saddr = 0x0; self->saddr = 0x0;
IRDA_DEBUG(1, __FUNCTION__ "(), trying daddr = %08x\n", IRDA_DEBUG(1, "%s(), trying daddr = %08x\n",
self->daddr); __FUNCTION__, self->daddr);
/* Query remote LM-IAS for this service */ /* Query remote LM-IAS for this service */
err = irda_find_lsap_sel(self, name); err = irda_find_lsap_sel(self, name);
...@@ -661,9 +661,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -661,9 +661,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
case 0: case 0:
/* We found the requested service */ /* We found the requested service */
if(daddr != DEV_ADDR_ANY) { if(daddr != DEV_ADDR_ANY) {
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n",
"(), discovered service ''%s'' in two different devices !!!\n", __FUNCTION__, name);
name);
self->daddr = DEV_ADDR_ANY; self->daddr = DEV_ADDR_ANY;
kfree(discoveries); kfree(discoveries);
return(-ENOTUNIQ); return(-ENOTUNIQ);
...@@ -677,8 +676,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -677,8 +676,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
break; break;
default: default:
/* Something bad did happen :-( */ /* Something bad did happen :-( */
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __FUNCTION__);
"(), unexpected IAS query failure\n");
self->daddr = DEV_ADDR_ANY; self->daddr = DEV_ADDR_ANY;
kfree(discoveries); kfree(discoveries);
return(-EHOSTUNREACH); return(-EHOSTUNREACH);
...@@ -690,9 +688,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -690,9 +688,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
/* Check out what we found */ /* Check out what we found */
if(daddr == DEV_ADDR_ANY) { if(daddr == DEV_ADDR_ANY) {
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n",
"(), cannot discover service ''%s'' in any device !!!\n", __FUNCTION__, name);
name);
self->daddr = DEV_ADDR_ANY; self->daddr = DEV_ADDR_ANY;
return(-EADDRNOTAVAIL); return(-EADDRNOTAVAIL);
} }
...@@ -702,9 +699,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -702,9 +699,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
self->saddr = 0x0; self->saddr = 0x0;
self->dtsap_sel = dtsap_sel; self->dtsap_sel = dtsap_sel;
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n",
"(), discovered requested service ''%s'' at address %08x\n", __FUNCTION__, name, self->daddr);
name, self->daddr);
return 0; return 0;
} }
...@@ -735,8 +731,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr, ...@@ -735,8 +731,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
saddr.sir_addr = self->saddr; saddr.sir_addr = self->saddr;
} }
IRDA_DEBUG(1, __FUNCTION__ "(), tsap_sel = %#x\n", saddr.sir_lsap_sel); IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __FUNCTION__, saddr.sir_lsap_sel);
IRDA_DEBUG(1, __FUNCTION__ "(), addr = %08x\n", saddr.sir_addr); IRDA_DEBUG(1, "%s(), addr = %08x\n", __FUNCTION__, saddr.sir_addr);
/* uaddr_len come to us uninitialised */ /* uaddr_len come to us uninitialised */
*uaddr_len = sizeof (struct sockaddr_irda); *uaddr_len = sizeof (struct sockaddr_irda);
...@@ -755,7 +751,7 @@ static int irda_listen(struct socket *sock, int backlog) ...@@ -755,7 +751,7 @@ static int irda_listen(struct socket *sock, int backlog)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if ((sk->type != SOCK_STREAM) && (sk->type != SOCK_SEQPACKET) && if ((sk->type != SOCK_STREAM) && (sk->type != SOCK_SEQPACKET) &&
(sk->type != SOCK_DGRAM)) (sk->type != SOCK_DGRAM))
...@@ -786,7 +782,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ...@@ -786,7 +782,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
if (addr_len != sizeof(struct sockaddr_irda)) if (addr_len != sizeof(struct sockaddr_irda))
return -EINVAL; return -EINVAL;
...@@ -796,8 +792,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ...@@ -796,8 +792,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
if ((sk->type == SOCK_DGRAM) && (sk->protocol == IRDAPROTO_ULTRA)) { if ((sk->type == SOCK_DGRAM) && (sk->protocol == IRDAPROTO_ULTRA)) {
self->pid = addr->sir_lsap_sel; self->pid = addr->sir_lsap_sel;
if (self->pid & 0x80) { if (self->pid & 0x80) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__);
"(), extension in PID not supp!\n");
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
err = irda_open_lsap(self, self->pid); err = irda_open_lsap(self, self->pid);
...@@ -842,7 +837,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) ...@@ -842,7 +837,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
struct sk_buff *skb; struct sk_buff *skb;
int err; int err;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -918,7 +913,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) ...@@ -918,7 +913,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
/* Now attach up the new socket */ /* Now attach up the new socket */
new->tsap = irttp_dup(self->tsap, new); new->tsap = irttp_dup(self->tsap, new);
if (!new->tsap) { if (!new->tsap) {
IRDA_DEBUG(0, __FUNCTION__ "(), dup failed!\n"); IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -977,7 +972,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, ...@@ -977,7 +972,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
struct irda_sock *self = irda_sk(sk); struct irda_sock *self = irda_sk(sk);
int err; int err;
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
/* Don't allow connect for Ultra sockets */ /* Don't allow connect for Ultra sockets */
if ((sk->type == SOCK_DGRAM) && (sk->protocol == IRDAPROTO_ULTRA)) if ((sk->type == SOCK_DGRAM) && (sk->protocol == IRDAPROTO_ULTRA))
...@@ -1007,19 +1002,18 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, ...@@ -1007,19 +1002,18 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
/* Try to find one suitable */ /* Try to find one suitable */
err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name);
if (err) { if (err) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __FUNCTION__);
"(), auto-connect failed!\n");
return err; return err;
} }
} else { } else {
/* Use the one provided by the user */ /* Use the one provided by the user */
self->daddr = addr->sir_addr; self->daddr = addr->sir_addr;
IRDA_DEBUG(1, __FUNCTION__ "(), daddr = %08x\n", self->daddr); IRDA_DEBUG(1, "%s(), daddr = %08x\n", __FUNCTION__, self->daddr);
/* Query remote LM-IAS */ /* Query remote LM-IAS */
err = irda_find_lsap_sel(self, addr->sir_name); err = irda_find_lsap_sel(self, addr->sir_name);
if (err) { if (err) {
IRDA_DEBUG(0, __FUNCTION__ "(), connect failed!\n"); IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
return err; return err;
} }
} }
...@@ -1037,7 +1031,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, ...@@ -1037,7 +1031,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
self->saddr, self->daddr, NULL, self->saddr, self->daddr, NULL,
self->max_sdu_size_rx, NULL); self->max_sdu_size_rx, NULL);
if (err) { if (err) {
IRDA_DEBUG(0, __FUNCTION__ "(), connect failed!\n"); IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
return err; return err;
} }
......
...@@ -63,7 +63,7 @@ int __init ircomm_init(void) ...@@ -63,7 +63,7 @@ int __init ircomm_init(void)
{ {
ircomm = hashbin_new(HB_LOCK); ircomm = hashbin_new(HB_LOCK);
if (ircomm == NULL) { if (ircomm == NULL) {
ERROR(__FUNCTION__ "(), can't allocate hashbin!\n"); ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -228,7 +228,7 @@ int ircomm_lmp_data_request(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -228,7 +228,7 @@ int ircomm_lmp_data_request(struct ircomm_cb *self, struct sk_buff *skb,
} }
ret = irlmp_data_request(self->lsap, skb); ret = irlmp_data_request(self->lsap, skb);
if (ret) { if (ret) {
ERROR(__FUNCTION__ "(), failed\n"); ERROR("%s(), failed\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
......
...@@ -154,7 +154,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -154,7 +154,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
count = irda_param_insert(self, pi, skb->tail, skb_tailroom(skb), count = irda_param_insert(self, pi, skb->tail, skb_tailroom(skb),
&ircomm_param_info); &ircomm_param_info);
if (count < 0) { if (count < 0) {
WARNING(__FUNCTION__ "(), no room for parameter!\n"); WARNING("%s(), no room for parameter!\n", __FUNCTION__);
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
return -1; return -1;
} }
......
...@@ -146,7 +146,7 @@ int ircomm_ttp_data_request(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -146,7 +146,7 @@ int ircomm_ttp_data_request(struct ircomm_cb *self, struct sk_buff *skb,
ret = irttp_data_request(self->tsap, skb); ret = irttp_data_request(self->tsap, skb);
if (ret) { if (ret) {
ERROR(__FUNCTION__ "(), failed\n"); ERROR("%s(), failed\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
...@@ -192,7 +192,7 @@ void ircomm_ttp_connect_confirm(void *instance, void *sap, ...@@ -192,7 +192,7 @@ void ircomm_ttp_connect_confirm(void *instance, void *sap,
ASSERT(qos != NULL, return;); ASSERT(qos != NULL, return;);
if (max_sdu_size != TTP_SAR_DISABLE) { if (max_sdu_size != TTP_SAR_DISABLE) {
ERROR(__FUNCTION__ "(), SAR not allowed for IrCOMM!\n"); ERROR("%s(), SAR not allowed for IrCOMM!\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return; return;
} }
...@@ -229,7 +229,7 @@ void ircomm_ttp_connect_indication(void *instance, void *sap, ...@@ -229,7 +229,7 @@ void ircomm_ttp_connect_indication(void *instance, void *sap,
ASSERT(qos != NULL, return;); ASSERT(qos != NULL, return;);
if (max_sdu_size != TTP_SAR_DISABLE) { if (max_sdu_size != TTP_SAR_DISABLE) {
ERROR(__FUNCTION__ "(), SAR not allowed for IrCOMM!\n"); ERROR("%s(), SAR not allowed for IrCOMM!\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return; return;
} }
......
...@@ -92,7 +92,7 @@ int __init ircomm_tty_init(void) ...@@ -92,7 +92,7 @@ int __init ircomm_tty_init(void)
{ {
ircomm_tty = hashbin_new(HB_LOCK); ircomm_tty = hashbin_new(HB_LOCK);
if (ircomm_tty == NULL) { if (ircomm_tty == NULL) {
ERROR(__FUNCTION__ "(), can't allocate hashbin!\n"); ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -135,7 +135,7 @@ int __init ircomm_tty_init(void) ...@@ -135,7 +135,7 @@ int __init ircomm_tty_init(void)
driver.read_proc = ircomm_tty_read_proc; driver.read_proc = ircomm_tty_read_proc;
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
if (tty_register_driver(&driver)) { if (tty_register_driver(&driver)) {
ERROR(__FUNCTION__ "Couldn't register serial driver\n"); ERROR("%s(): Couldn't register serial driver\n", __FUNCTION__);
return -1; return -1;
} }
return 0; return 0;
...@@ -168,7 +168,7 @@ void __exit ircomm_tty_cleanup(void) ...@@ -168,7 +168,7 @@ void __exit ircomm_tty_cleanup(void)
ret = tty_unregister_driver(&driver); ret = tty_unregister_driver(&driver);
if (ret) { if (ret) {
ERROR(__FUNCTION__ "(), failed to unregister driver\n"); ERROR("%s(), failed to unregister driver\n", __FUNCTION__);
return; return;
} }
...@@ -223,7 +223,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self) ...@@ -223,7 +223,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
/* Connect IrCOMM link with remote device */ /* Connect IrCOMM link with remote device */
ret = ircomm_tty_attach_cable(self); ret = ircomm_tty_attach_cable(self);
if (ret < 0) { if (ret < 0) {
ERROR(__FUNCTION__ "(), error attaching cable!\n"); ERROR("%s(), error attaching cable!\n", __FUNCTION__);
return ret; return ret;
} }
...@@ -410,7 +410,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -410,7 +410,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
/* No, so make new instance */ /* No, so make new instance */
self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
if (self == NULL) { if (self == NULL) {
ERROR(__FUNCTION__"(), kmalloc failed!\n"); ERROR("%s(), kmalloc failed!\n", __FUNCTION__);
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
return -ENOMEM; return -ENOMEM;
} }
...@@ -563,9 +563,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -563,9 +563,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
} }
if (--self->open_count < 0) { if (--self->open_count < 0) {
ERROR(__FUNCTION__ ERROR("%s(), bad serial port count for ttys%d: %d\n",
"(), bad serial port count for ttys%d: %d\n", __FUNCTION__, self->line, self->open_count);
self->line, self->open_count);
self->open_count = 0; self->open_count = 0;
} }
if (self->open_count) { if (self->open_count) {
......
...@@ -601,8 +601,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, ...@@ -601,8 +601,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
self->saddr = info->saddr; self->saddr = info->saddr;
if (self->iriap) { if (self->iriap) {
WARNING(__FUNCTION__ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
"(), busy with a previous query\n");
return -EBUSY; return -EBUSY;
} }
...@@ -659,8 +658,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, ...@@ -659,8 +658,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
self->saddr = info->saddr; self->saddr = info->saddr;
if (self->iriap) { if (self->iriap) {
WARNING(__FUNCTION__ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
"(), busy with a previous query\n");
return -EBUSY; return -EBUSY;
} }
...@@ -728,8 +726,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, ...@@ -728,8 +726,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
switch (event) { switch (event) {
case IRCOMM_TTY_GOT_PARAMETERS: case IRCOMM_TTY_GOT_PARAMETERS:
if (self->iriap) { if (self->iriap) {
WARNING(__FUNCTION__ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
"(), busy with a previous query\n");
return -EBUSY; return -EBUSY;
} }
......
...@@ -95,7 +95,7 @@ void ircomm_tty_change_speed(struct ircomm_tty_cb *self) ...@@ -95,7 +95,7 @@ void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
self->settings.flow_control |= IRCOMM_RTS_CTS_IN; self->settings.flow_control |= IRCOMM_RTS_CTS_IN;
/* This got me. Bummer. Jean II */ /* This got me. Bummer. Jean II */
if (self->service_type == IRCOMM_3_WIRE_RAW) if (self->service_type == IRCOMM_3_WIRE_RAW)
WARNING(__FUNCTION__ "(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n"); WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__);
} else { } else {
self->flags &= ~ASYNC_CTS_FLOW; self->flags &= ~ASYNC_CTS_FLOW;
self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN;
......
...@@ -367,7 +367,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -367,7 +367,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
if (!skb) { if (!skb) {
ERROR( __FUNCTION__ "(), Got NULL skb!\n"); ERROR("%s(), Got NULL skb!\n", __FUNCTION__);
return; return;
} }
frame = skb->data; frame = skb->data;
......
...@@ -100,8 +100,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -100,8 +100,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
switch (event) { switch (event) {
case IRLAN_DISCOVERY_INDICATION: case IRLAN_DISCOVERY_INDICATION:
if (self->client.iriap) { if (self->client.iriap) {
WARNING(__FUNCTION__ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
"(), busy with a previous query\n");
return -EBUSY; return -EBUSY;
} }
......
...@@ -424,7 +424,7 @@ void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason, ...@@ -424,7 +424,7 @@ void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason,
IRDA_DEBUG(2, __FUNCTION__ "(), IrLMP connect failed\n"); IRDA_DEBUG(2, __FUNCTION__ "(), IrLMP connect failed\n");
break; break;
default: default:
ERROR(__FUNCTION__ "(), Unknown disconnect reason\n"); ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment