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