aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/irlmp.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-05 23:47:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-05 23:47:47 -0500
commit0dc47877a3de00ceadea0005189656ae8dc52669 (patch)
tree7440a87385fe318cb42f0ae161be195f5e967d82 /net/irda/irlmp.c
parent6387c4bed539539b05fa773cf2ff26529dc3074c (diff)
net: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irlmp.c')
-rw-r--r--net/irda/irlmp.c112
1 files changed, 56 insertions, 56 deletions
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index 135ac6907bbf..1f81f8e7c61d 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -76,7 +76,7 @@ const char *irlmp_reasons[] = {
76 */ 76 */
77int __init irlmp_init(void) 77int __init irlmp_init(void)
78{ 78{
79 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 79 IRDA_DEBUG(1, "%s()\n", __func__);
80 /* Initialize the irlmp structure. */ 80 /* Initialize the irlmp structure. */
81 irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL); 81 irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL);
82 if (irlmp == NULL) 82 if (irlmp == NULL)
@@ -164,7 +164,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid)
164 /* Allocate new instance of a LSAP connection */ 164 /* Allocate new instance of a LSAP connection */
165 self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC); 165 self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC);
166 if (self == NULL) { 166 if (self == NULL) {
167 IRDA_ERROR("%s: can't allocate memory\n", __FUNCTION__); 167 IRDA_ERROR("%s: can't allocate memory\n", __func__);
168 return NULL; 168 return NULL;
169 } 169 }
170 170
@@ -202,7 +202,7 @@ EXPORT_SYMBOL(irlmp_open_lsap);
202 */ 202 */
203static void __irlmp_close_lsap(struct lsap_cb *self) 203static void __irlmp_close_lsap(struct lsap_cb *self)
204{ 204{
205 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 205 IRDA_DEBUG(4, "%s()\n", __func__);
206 206
207 IRDA_ASSERT(self != NULL, return;); 207 IRDA_ASSERT(self != NULL, return;);
208 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 208 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -264,7 +264,7 @@ void irlmp_close_lsap(struct lsap_cb *self)
264 if (!lsap) { 264 if (!lsap) {
265 IRDA_DEBUG(0, 265 IRDA_DEBUG(0,
266 "%s(), Looks like somebody has removed me already!\n", 266 "%s(), Looks like somebody has removed me already!\n",
267 __FUNCTION__); 267 __func__);
268 return; 268 return;
269 } 269 }
270 __irlmp_close_lsap(self); 270 __irlmp_close_lsap(self);
@@ -291,7 +291,7 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
291 */ 291 */
292 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL); 292 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL);
293 if (lap == NULL) { 293 if (lap == NULL) {
294 IRDA_ERROR("%s: unable to kmalloc\n", __FUNCTION__); 294 IRDA_ERROR("%s: unable to kmalloc\n", __func__);
295 return; 295 return;
296 } 296 }
297 297
@@ -304,7 +304,7 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
304#endif 304#endif
305 lap->lsaps = hashbin_new(HB_LOCK); 305 lap->lsaps = hashbin_new(HB_LOCK);
306 if (lap->lsaps == NULL) { 306 if (lap->lsaps == NULL) {
307 IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __FUNCTION__); 307 IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __func__);
308 kfree(lap); 308 kfree(lap);
309 return; 309 return;
310 } 310 }
@@ -336,7 +336,7 @@ void irlmp_unregister_link(__u32 saddr)
336{ 336{
337 struct lap_cb *link; 337 struct lap_cb *link;
338 338
339 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 339 IRDA_DEBUG(4, "%s()\n", __func__);
340 340
341 /* We must remove ourselves from the hashbin *first*. This ensure 341 /* We must remove ourselves from the hashbin *first*. This ensure
342 * that no more LSAPs will be open on this link and no discovery 342 * that no more LSAPs will be open on this link and no discovery
@@ -381,7 +381,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
381 381
382 IRDA_DEBUG(2, 382 IRDA_DEBUG(2,
383 "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", 383 "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n",
384 __FUNCTION__, self->slsap_sel, dlsap_sel, saddr, daddr); 384 __func__, self->slsap_sel, dlsap_sel, saddr, daddr);
385 385
386 if (test_bit(0, &self->connected)) { 386 if (test_bit(0, &self->connected)) {
387 ret = -EISCONN; 387 ret = -EISCONN;
@@ -425,7 +425,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
425 if (daddr != DEV_ADDR_ANY) 425 if (daddr != DEV_ADDR_ANY)
426 discovery = hashbin_find(irlmp->cachelog, daddr, NULL); 426 discovery = hashbin_find(irlmp->cachelog, daddr, NULL);
427 else { 427 else {
428 IRDA_DEBUG(2, "%s(), no daddr\n", __FUNCTION__); 428 IRDA_DEBUG(2, "%s(), no daddr\n", __func__);
429 discovery = (discovery_t *) 429 discovery = (discovery_t *)
430 hashbin_get_first(irlmp->cachelog); 430 hashbin_get_first(irlmp->cachelog);
431 } 431 }
@@ -438,7 +438,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
438 } 438 }
439 lap = hashbin_lock_find(irlmp->links, saddr, NULL); 439 lap = hashbin_lock_find(irlmp->links, saddr, NULL);
440 if (lap == NULL) { 440 if (lap == NULL) {
441 IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __FUNCTION__); 441 IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __func__);
442 ret = -EHOSTUNREACH; 442 ret = -EHOSTUNREACH;
443 goto err; 443 goto err;
444 } 444 }
@@ -453,14 +453,14 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
453 * disconnected yet (waiting for timeout in LAP). 453 * disconnected yet (waiting for timeout in LAP).
454 * Maybe we could give LAP a bit of help in this case. 454 * Maybe we could give LAP a bit of help in this case.
455 */ 455 */
456 IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __FUNCTION__); 456 IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __func__);
457 ret = -EAGAIN; 457 ret = -EAGAIN;
458 goto err; 458 goto err;
459 } 459 }
460 460
461 /* LAP is already connected to a different node, and LAP 461 /* LAP is already connected to a different node, and LAP
462 * can only talk to one node at a time */ 462 * can only talk to one node at a time */
463 IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __FUNCTION__); 463 IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __func__);
464 ret = -EBUSY; 464 ret = -EBUSY;
465 goto err; 465 goto err;
466 } 466 }
@@ -522,7 +522,7 @@ void irlmp_connect_indication(struct lsap_cb *self, struct sk_buff *skb)
522 IRDA_ASSERT(self->lap != NULL, return;); 522 IRDA_ASSERT(self->lap != NULL, return;);
523 523
524 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 524 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
525 __FUNCTION__, self->slsap_sel, self->dlsap_sel); 525 __func__, self->slsap_sel, self->dlsap_sel);
526 526
527 /* Note : self->lap is set in irlmp_link_data_indication(), 527 /* Note : self->lap is set in irlmp_link_data_indication(),
528 * (case CONNECT_CMD:) because we have no way to set it here. 528 * (case CONNECT_CMD:) because we have no way to set it here.
@@ -563,7 +563,7 @@ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata)
563 * in the state machine itself. Jean II */ 563 * in the state machine itself. Jean II */
564 564
565 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 565 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
566 __FUNCTION__, self->slsap_sel, self->dlsap_sel); 566 __func__, self->slsap_sel, self->dlsap_sel);
567 567
568 /* Make room for MUX control header (3 bytes) */ 568 /* Make room for MUX control header (3 bytes) */
569 IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); 569 IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;);
@@ -589,7 +589,7 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
589 int lap_header_size; 589 int lap_header_size;
590 int max_seg_size; 590 int max_seg_size;
591 591
592 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 592 IRDA_DEBUG(3, "%s()\n", __func__);
593 593
594 IRDA_ASSERT(skb != NULL, return;); 594 IRDA_ASSERT(skb != NULL, return;);
595 IRDA_ASSERT(self != NULL, return;); 595 IRDA_ASSERT(self != NULL, return;);
@@ -603,7 +603,7 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
603 max_header_size = LMP_HEADER + lap_header_size; 603 max_header_size = LMP_HEADER + lap_header_size;
604 604
605 IRDA_DEBUG(2, "%s(), max_header_size=%d\n", 605 IRDA_DEBUG(2, "%s(), max_header_size=%d\n",
606 __FUNCTION__, max_header_size); 606 __func__, max_header_size);
607 607
608 /* Hide LMP_CONTROL_HEADER header from layer above */ 608 /* Hide LMP_CONTROL_HEADER header from layer above */
609 skb_pull(skb, LMP_CONTROL_HEADER); 609 skb_pull(skb, LMP_CONTROL_HEADER);
@@ -629,7 +629,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
629 struct lsap_cb *new; 629 struct lsap_cb *new;
630 unsigned long flags; 630 unsigned long flags;
631 631
632 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 632 IRDA_DEBUG(1, "%s()\n", __func__);
633 633
634 spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags); 634 spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags);
635 635
@@ -638,7 +638,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
638 if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) || 638 if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) ||
639 (orig->lap == NULL)) { 639 (orig->lap == NULL)) {
640 IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n", 640 IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n",
641 __FUNCTION__); 641 __func__);
642 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, 642 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
643 flags); 643 flags);
644 return NULL; 644 return NULL;
@@ -647,7 +647,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
647 /* Allocate a new instance */ 647 /* Allocate a new instance */
648 new = kmemdup(orig, sizeof(*new), GFP_ATOMIC); 648 new = kmemdup(orig, sizeof(*new), GFP_ATOMIC);
649 if (!new) { 649 if (!new) {
650 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__); 650 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__);
651 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, 651 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
652 flags); 652 flags);
653 return NULL; 653 return NULL;
@@ -693,7 +693,7 @@ int irlmp_disconnect_request(struct lsap_cb *self, struct sk_buff *userdata)
693 * and us that might mess up the hashbins below. This fixes it. 693 * and us that might mess up the hashbins below. This fixes it.
694 * Jean II */ 694 * Jean II */
695 if (! test_and_clear_bit(0, &self->connected)) { 695 if (! test_and_clear_bit(0, &self->connected)) {
696 IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__); 696 IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__);
697 dev_kfree_skb(userdata); 697 dev_kfree_skb(userdata);
698 return -1; 698 return -1;
699 } 699 }
@@ -747,19 +747,19 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
747{ 747{
748 struct lsap_cb *lsap; 748 struct lsap_cb *lsap;
749 749
750 IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]); 750 IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
751 IRDA_ASSERT(self != NULL, return;); 751 IRDA_ASSERT(self != NULL, return;);
752 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 752 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
753 753
754 IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 754 IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
755 __FUNCTION__, self->slsap_sel, self->dlsap_sel); 755 __func__, self->slsap_sel, self->dlsap_sel);
756 756
757 /* Already disconnected ? 757 /* Already disconnected ?
758 * There is a race condition between irlmp_disconnect_request() 758 * There is a race condition between irlmp_disconnect_request()
759 * and us that might mess up the hashbins below. This fixes it. 759 * and us that might mess up the hashbins below. This fixes it.
760 * Jean II */ 760 * Jean II */
761 if (! test_and_clear_bit(0, &self->connected)) { 761 if (! test_and_clear_bit(0, &self->connected)) {
762 IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__); 762 IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__);
763 return; 763 return;
764 } 764 }
765 765
@@ -792,7 +792,7 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
792 self->notify.disconnect_indication(self->notify.instance, 792 self->notify.disconnect_indication(self->notify.instance,
793 self, reason, skb); 793 self, reason, skb);
794 } else { 794 } else {
795 IRDA_DEBUG(0, "%s(), no handler\n", __FUNCTION__); 795 IRDA_DEBUG(0, "%s(), no handler\n", __func__);
796 } 796 }
797} 797}
798 798
@@ -845,7 +845,7 @@ void irlmp_do_discovery(int nslots)
845 /* Make sure the value is sane */ 845 /* Make sure the value is sane */
846 if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){ 846 if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){
847 IRDA_WARNING("%s: invalid value for number of slots!\n", 847 IRDA_WARNING("%s: invalid value for number of slots!\n",
848 __FUNCTION__); 848 __func__);
849 nslots = sysctl_discovery_slots = 8; 849 nslots = sysctl_discovery_slots = 8;
850 } 850 }
851 851
@@ -963,7 +963,7 @@ irlmp_notify_client(irlmp_client_t *client,
963 int number; /* Number of nodes in the log */ 963 int number; /* Number of nodes in the log */
964 int i; 964 int i;
965 965
966 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 966 IRDA_DEBUG(3, "%s()\n", __func__);
967 967
968 /* Check if client wants or not partial/selective log (optimisation) */ 968 /* Check if client wants or not partial/selective log (optimisation) */
969 if (!client->disco_callback) 969 if (!client->disco_callback)
@@ -1014,7 +1014,7 @@ void irlmp_discovery_confirm(hashbin_t *log, DISCOVERY_MODE mode)
1014 irlmp_client_t *client; 1014 irlmp_client_t *client;
1015 irlmp_client_t *client_next; 1015 irlmp_client_t *client_next;
1016 1016
1017 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 1017 IRDA_DEBUG(3, "%s()\n", __func__);
1018 1018
1019 IRDA_ASSERT(log != NULL, return;); 1019 IRDA_ASSERT(log != NULL, return;);
1020 1020
@@ -1049,7 +1049,7 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
1049 irlmp_client_t *client_next; 1049 irlmp_client_t *client_next;
1050 int i; 1050 int i;
1051 1051
1052 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 1052 IRDA_DEBUG(3, "%s()\n", __func__);
1053 1053
1054 IRDA_ASSERT(expiries != NULL, return;); 1054 IRDA_ASSERT(expiries != NULL, return;);
1055 1055
@@ -1082,7 +1082,7 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
1082 */ 1082 */
1083discovery_t *irlmp_get_discovery_response(void) 1083discovery_t *irlmp_get_discovery_response(void)
1084{ 1084{
1085 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1085 IRDA_DEBUG(4, "%s()\n", __func__);
1086 1086
1087 IRDA_ASSERT(irlmp != NULL, return NULL;); 1087 IRDA_ASSERT(irlmp != NULL, return NULL;);
1088 1088
@@ -1160,7 +1160,7 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata)
1160{ 1160{
1161 int ret; 1161 int ret;
1162 1162
1163 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1163 IRDA_DEBUG(4, "%s()\n", __func__);
1164 1164
1165 IRDA_ASSERT(userdata != NULL, return -1;); 1165 IRDA_ASSERT(userdata != NULL, return -1;);
1166 1166
@@ -1184,7 +1184,7 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata)
1184 */ 1184 */
1185void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb) 1185void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb)
1186{ 1186{
1187 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1187 IRDA_DEBUG(4, "%s()\n", __func__);
1188 1188
1189 IRDA_ASSERT(self != NULL, return;); 1189 IRDA_ASSERT(self != NULL, return;);
1190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 1190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -1211,7 +1211,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata,
1211 struct sk_buff *clone_skb; 1211 struct sk_buff *clone_skb;
1212 struct lap_cb *lap; 1212 struct lap_cb *lap;
1213 1213
1214 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1214 IRDA_DEBUG(4, "%s()\n", __func__);
1215 1215
1216 IRDA_ASSERT(userdata != NULL, return -1;); 1216 IRDA_ASSERT(userdata != NULL, return -1;);
1217 1217
@@ -1262,7 +1262,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata,
1262#ifdef CONFIG_IRDA_ULTRA 1262#ifdef CONFIG_IRDA_ULTRA
1263void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) 1263void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb)
1264{ 1264{
1265 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1265 IRDA_DEBUG(4, "%s()\n", __func__);
1266 1266
1267 IRDA_ASSERT(self != NULL, return;); 1267 IRDA_ASSERT(self != NULL, return;);
1268 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 1268 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -1305,7 +1305,7 @@ void irlmp_status_indication(struct lap_cb *self,
1305 curr->notify.status_indication(curr->notify.instance, 1305 curr->notify.status_indication(curr->notify.instance,
1306 link, lock); 1306 link, lock);
1307 else 1307 else
1308 IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__); 1308 IRDA_DEBUG(2, "%s(), no handler\n", __func__);
1309 1309
1310 curr = next; 1310 curr = next;
1311 } 1311 }
@@ -1333,7 +1333,7 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
1333 /* Get the number of lsap. That's the only safe way to know 1333 /* Get the number of lsap. That's the only safe way to know
1334 * that we have looped around... - Jean II */ 1334 * that we have looped around... - Jean II */
1335 lsap_todo = HASHBIN_GET_SIZE(self->lsaps); 1335 lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
1336 IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __FUNCTION__, lsap_todo); 1336 IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __func__, lsap_todo);
1337 1337
1338 /* Poll lsap in order until the queue is full or until we 1338 /* Poll lsap in order until the queue is full or until we
1339 * tried them all. 1339 * tried them all.
@@ -1352,14 +1352,14 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
1352 /* Uh-oh... Paranoia */ 1352 /* Uh-oh... Paranoia */
1353 if(curr == NULL) 1353 if(curr == NULL)
1354 break; 1354 break;
1355 IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __FUNCTION__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap)); 1355 IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __func__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
1356 1356
1357 /* Inform lsap user that it can send one more packet. */ 1357 /* Inform lsap user that it can send one more packet. */
1358 if (curr->notify.flow_indication != NULL) 1358 if (curr->notify.flow_indication != NULL)
1359 curr->notify.flow_indication(curr->notify.instance, 1359 curr->notify.flow_indication(curr->notify.instance,
1360 curr, flow); 1360 curr, flow);
1361 else 1361 else
1362 IRDA_DEBUG(1, "%s(), no handler\n", __FUNCTION__); 1362 IRDA_DEBUG(1, "%s(), no handler\n", __func__);
1363 } 1363 }
1364} 1364}
1365 1365
@@ -1381,7 +1381,7 @@ __u8 *irlmp_hint_to_service(__u8 *hint)
1381 */ 1381 */
1382 service = kmalloc(16, GFP_ATOMIC); 1382 service = kmalloc(16, GFP_ATOMIC);
1383 if (!service) { 1383 if (!service) {
1384 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__); 1384 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
1385 return NULL; 1385 return NULL;
1386 } 1386 }
1387 1387
@@ -1482,12 +1482,12 @@ void *irlmp_register_service(__u16 hints)
1482{ 1482{
1483 irlmp_service_t *service; 1483 irlmp_service_t *service;
1484 1484
1485 IRDA_DEBUG(4, "%s(), hints = %04x\n", __FUNCTION__, hints); 1485 IRDA_DEBUG(4, "%s(), hints = %04x\n", __func__, hints);
1486 1486
1487 /* Make a new registration */ 1487 /* Make a new registration */
1488 service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); 1488 service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC);
1489 if (!service) { 1489 if (!service) {
1490 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__); 1490 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
1491 return NULL; 1491 return NULL;
1492 } 1492 }
1493 service->hints.word = hints; 1493 service->hints.word = hints;
@@ -1512,7 +1512,7 @@ int irlmp_unregister_service(void *handle)
1512 irlmp_service_t *service; 1512 irlmp_service_t *service;
1513 unsigned long flags; 1513 unsigned long flags;
1514 1514
1515 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1515 IRDA_DEBUG(4, "%s()\n", __func__);
1516 1516
1517 if (!handle) 1517 if (!handle)
1518 return -1; 1518 return -1;
@@ -1520,7 +1520,7 @@ int irlmp_unregister_service(void *handle)
1520 /* Caller may call with invalid handle (it's legal) - Jean II */ 1520 /* Caller may call with invalid handle (it's legal) - Jean II */
1521 service = hashbin_lock_find(irlmp->services, (long) handle, NULL); 1521 service = hashbin_lock_find(irlmp->services, (long) handle, NULL);
1522 if (!service) { 1522 if (!service) {
1523 IRDA_DEBUG(1, "%s(), Unknown service!\n", __FUNCTION__); 1523 IRDA_DEBUG(1, "%s(), Unknown service!\n", __func__);
1524 return -1; 1524 return -1;
1525 } 1525 }
1526 1526
@@ -1557,13 +1557,13 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb,
1557{ 1557{
1558 irlmp_client_t *client; 1558 irlmp_client_t *client;
1559 1559
1560 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 1560 IRDA_DEBUG(1, "%s()\n", __func__);
1561 IRDA_ASSERT(irlmp != NULL, return NULL;); 1561 IRDA_ASSERT(irlmp != NULL, return NULL;);
1562 1562
1563 /* Make a new registration */ 1563 /* Make a new registration */
1564 client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); 1564 client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC);
1565 if (!client) { 1565 if (!client) {
1566 IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__); 1566 IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __func__);
1567 return NULL; 1567 return NULL;
1568 } 1568 }
1569 1569
@@ -1599,7 +1599,7 @@ int irlmp_update_client(void *handle, __u16 hint_mask,
1599 1599
1600 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); 1600 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
1601 if (!client) { 1601 if (!client) {
1602 IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__); 1602 IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__);
1603 return -1; 1603 return -1;
1604 } 1604 }
1605 1605
@@ -1622,7 +1622,7 @@ int irlmp_unregister_client(void *handle)
1622{ 1622{
1623 struct irlmp_client *client; 1623 struct irlmp_client *client;
1624 1624
1625 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1625 IRDA_DEBUG(4, "%s()\n", __func__);
1626 1626
1627 if (!handle) 1627 if (!handle)
1628 return -1; 1628 return -1;
@@ -1630,11 +1630,11 @@ int irlmp_unregister_client(void *handle)
1630 /* Caller may call with invalid handle (it's legal) - Jean II */ 1630 /* Caller may call with invalid handle (it's legal) - Jean II */
1631 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); 1631 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
1632 if (!client) { 1632 if (!client) {
1633 IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__); 1633 IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__);
1634 return -1; 1634 return -1;
1635 } 1635 }
1636 1636
1637 IRDA_DEBUG(4, "%s(), removing client!\n", __FUNCTION__); 1637 IRDA_DEBUG(4, "%s(), removing client!\n", __func__);
1638 hashbin_remove_this(irlmp->clients, (irda_queue_t *) client); 1638 hashbin_remove_this(irlmp->clients, (irda_queue_t *) client);
1639 kfree(client); 1639 kfree(client);
1640 1640
@@ -1663,7 +1663,7 @@ static int irlmp_slsap_inuse(__u8 slsap_sel)
1663 IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); 1663 IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;);
1664 IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;); 1664 IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;);
1665 1665
1666 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1666 IRDA_DEBUG(4, "%s()\n", __func__);
1667 1667
1668#ifdef CONFIG_IRDA_ULTRA 1668#ifdef CONFIG_IRDA_ULTRA
1669 /* Accept all bindings to the connectionless LSAP */ 1669 /* Accept all bindings to the connectionless LSAP */
@@ -1790,7 +1790,7 @@ static __u8 irlmp_find_free_slsap(void)
1790 /* Make sure we terminate the loop */ 1790 /* Make sure we terminate the loop */
1791 if (wrapped++) { 1791 if (wrapped++) {
1792 IRDA_ERROR("%s: no more free LSAPs !\n", 1792 IRDA_ERROR("%s: no more free LSAPs !\n",
1793 __FUNCTION__); 1793 __func__);
1794 return 0; 1794 return 0;
1795 } 1795 }
1796 } 1796 }
@@ -1805,7 +1805,7 @@ static __u8 irlmp_find_free_slsap(void)
1805 /* Got it ! */ 1805 /* Got it ! */
1806 lsap_sel = irlmp->last_lsap_sel; 1806 lsap_sel = irlmp->last_lsap_sel;
1807 IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n", 1807 IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n",
1808 __FUNCTION__, lsap_sel); 1808 __func__, lsap_sel);
1809 1809
1810 return lsap_sel; 1810 return lsap_sel;
1811} 1811}
@@ -1823,26 +1823,26 @@ LM_REASON irlmp_convert_lap_reason( LAP_REASON lap_reason)
1823 1823
1824 switch (lap_reason) { 1824 switch (lap_reason) {
1825 case LAP_DISC_INDICATION: /* Received a disconnect request from peer */ 1825 case LAP_DISC_INDICATION: /* Received a disconnect request from peer */
1826 IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __FUNCTION__); 1826 IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __func__);
1827 reason = LM_USER_REQUEST; 1827 reason = LM_USER_REQUEST;
1828 break; 1828 break;
1829 case LAP_NO_RESPONSE: /* To many retransmits without response */ 1829 case LAP_NO_RESPONSE: /* To many retransmits without response */
1830 IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __FUNCTION__); 1830 IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __func__);
1831 reason = LM_LAP_DISCONNECT; 1831 reason = LM_LAP_DISCONNECT;
1832 break; 1832 break;
1833 case LAP_RESET_INDICATION: 1833 case LAP_RESET_INDICATION:
1834 IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __FUNCTION__); 1834 IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __func__);
1835 reason = LM_LAP_RESET; 1835 reason = LM_LAP_RESET;
1836 break; 1836 break;
1837 case LAP_FOUND_NONE: 1837 case LAP_FOUND_NONE:
1838 case LAP_MEDIA_BUSY: 1838 case LAP_MEDIA_BUSY:
1839 case LAP_PRIMARY_CONFLICT: 1839 case LAP_PRIMARY_CONFLICT:
1840 IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __FUNCTION__); 1840 IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __func__);
1841 reason = LM_CONNECT_FAILURE; 1841 reason = LM_CONNECT_FAILURE;
1842 break; 1842 break;
1843 default: 1843 default:
1844 IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n", 1844 IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n",
1845 __FUNCTION__, lap_reason); 1845 __func__, lap_reason);
1846 reason = LM_LAP_DISCONNECT; 1846 reason = LM_LAP_DISCONNECT;
1847 break; 1847 break;
1848 } 1848 }