aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/iriap.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/iriap.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/iriap.c')
-rw-r--r--net/irda/iriap.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 390a790886eb..9e15c82960fe 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -108,7 +108,7 @@ int __init iriap_init(void)
108 irias_objects = hashbin_new(HB_LOCK); 108 irias_objects = hashbin_new(HB_LOCK);
109 if (!irias_objects) { 109 if (!irias_objects) {
110 IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n", 110 IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n",
111 __FUNCTION__); 111 __func__);
112 hashbin_delete(iriap, NULL); 112 hashbin_delete(iriap, NULL);
113 return -ENOMEM; 113 return -ENOMEM;
114 } 114 }
@@ -139,7 +139,7 @@ int __init iriap_init(void)
139 */ 139 */
140 server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); 140 server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
141 if (!server) { 141 if (!server) {
142 IRDA_DEBUG(0, "%s(), unable to open server\n", __FUNCTION__); 142 IRDA_DEBUG(0, "%s(), unable to open server\n", __func__);
143 return -1; 143 return -1;
144 } 144 }
145 iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); 145 iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
@@ -171,11 +171,11 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
171{ 171{
172 struct iriap_cb *self; 172 struct iriap_cb *self;
173 173
174 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 174 IRDA_DEBUG(2, "%s()\n", __func__);
175 175
176 self = kzalloc(sizeof(*self), GFP_ATOMIC); 176 self = kzalloc(sizeof(*self), GFP_ATOMIC);
177 if (!self) { 177 if (!self) {
178 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 178 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
179 return NULL; 179 return NULL;
180 } 180 }
181 181
@@ -217,7 +217,7 @@ EXPORT_SYMBOL(iriap_open);
217 */ 217 */
218static void __iriap_close(struct iriap_cb *self) 218static void __iriap_close(struct iriap_cb *self)
219{ 219{
220 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 220 IRDA_DEBUG(4, "%s()\n", __func__);
221 221
222 IRDA_ASSERT(self != NULL, return;); 222 IRDA_ASSERT(self != NULL, return;);
223 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 223 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -241,7 +241,7 @@ void iriap_close(struct iriap_cb *self)
241{ 241{
242 struct iriap_cb *entry; 242 struct iriap_cb *entry;
243 243
244 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 244 IRDA_DEBUG(2, "%s()\n", __func__);
245 245
246 IRDA_ASSERT(self != NULL, return;); 246 IRDA_ASSERT(self != NULL, return;);
247 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 247 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -262,7 +262,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
262{ 262{
263 notify_t notify; 263 notify_t notify;
264 264
265 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 265 IRDA_DEBUG(2, "%s()\n", __func__);
266 266
267 irda_notify_init(&notify); 267 irda_notify_init(&notify);
268 notify.connect_confirm = iriap_connect_confirm; 268 notify.connect_confirm = iriap_connect_confirm;
@@ -277,7 +277,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
277 277
278 self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0); 278 self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0);
279 if (self->lsap == NULL) { 279 if (self->lsap == NULL) {
280 IRDA_ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__); 280 IRDA_ERROR("%s: Unable to allocated LSAP!\n", __func__);
281 return -1; 281 return -1;
282 } 282 }
283 self->slsap_sel = self->lsap->slsap_sel; 283 self->slsap_sel = self->lsap->slsap_sel;
@@ -297,7 +297,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
297{ 297{
298 struct iriap_cb *self; 298 struct iriap_cb *self;
299 299
300 IRDA_DEBUG(4, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]); 300 IRDA_DEBUG(4, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
301 301
302 self = (struct iriap_cb *) instance; 302 self = (struct iriap_cb *) instance;
303 303
@@ -313,7 +313,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
313 dev_kfree_skb(skb); 313 dev_kfree_skb(skb);
314 314
315 if (self->mode == IAS_CLIENT) { 315 if (self->mode == IAS_CLIENT) {
316 IRDA_DEBUG(4, "%s(), disconnect as client\n", __FUNCTION__); 316 IRDA_DEBUG(4, "%s(), disconnect as client\n", __func__);
317 317
318 318
319 iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, 319 iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION,
@@ -326,7 +326,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
326 if (self->confirm) 326 if (self->confirm)
327 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); 327 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
328 } else { 328 } else {
329 IRDA_DEBUG(4, "%s(), disconnect as server\n", __FUNCTION__); 329 IRDA_DEBUG(4, "%s(), disconnect as server\n", __func__);
330 iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, 330 iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
331 NULL); 331 NULL);
332 iriap_close(self); 332 iriap_close(self);
@@ -340,7 +340,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
340{ 340{
341 struct sk_buff *tx_skb; 341 struct sk_buff *tx_skb;
342 342
343 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 343 IRDA_DEBUG(4, "%s()\n", __func__);
344 344
345 IRDA_ASSERT(self != NULL, return;); 345 IRDA_ASSERT(self != NULL, return;);
346 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 346 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -349,7 +349,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
349 if (tx_skb == NULL) { 349 if (tx_skb == NULL) {
350 IRDA_DEBUG(0, 350 IRDA_DEBUG(0,
351 "%s(), Could not allocate an sk_buff of length %d\n", 351 "%s(), Could not allocate an sk_buff of length %d\n",
352 __FUNCTION__, LMP_MAX_HEADER); 352 __func__, LMP_MAX_HEADER);
353 return; 353 return;
354 } 354 }
355 355
@@ -453,13 +453,13 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
453 /* Get length, MSB first */ 453 /* Get length, MSB first */
454 len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; 454 len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
455 455
456 IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len); 456 IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len);
457 457
458 /* Get object ID, MSB first */ 458 /* Get object ID, MSB first */
459 obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; 459 obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
460 460
461 type = fp[n++]; 461 type = fp[n++];
462 IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type); 462 IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type);
463 463
464 switch (type) { 464 switch (type) {
465 case IAS_INTEGER: 465 case IAS_INTEGER:
@@ -468,7 +468,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
468 value = irias_new_integer_value(tmp_cpu32); 468 value = irias_new_integer_value(tmp_cpu32);
469 469
470 /* Legal values restricted to 0x01-0x6f, page 15 irttp */ 470 /* Legal values restricted to 0x01-0x6f, page 15 irttp */
471 IRDA_DEBUG(4, "%s(), lsap=%d\n", __FUNCTION__, value->t.integer); 471 IRDA_DEBUG(4, "%s(), lsap=%d\n", __func__, value->t.integer);
472 break; 472 break;
473 case IAS_STRING: 473 case IAS_STRING:
474 charset = fp[n++]; 474 charset = fp[n++];
@@ -488,7 +488,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
488/* case CS_UNICODE: */ 488/* case CS_UNICODE: */
489 default: 489 default:
490 IRDA_DEBUG(0, "%s(), charset %s, not supported\n", 490 IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
491 __FUNCTION__, ias_charset_types[charset]); 491 __func__, ias_charset_types[charset]);
492 492
493 /* Aborting, close connection! */ 493 /* Aborting, close connection! */
494 iriap_disconnect_request(self); 494 iriap_disconnect_request(self);
@@ -496,7 +496,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
496 /* break; */ 496 /* break; */
497 } 497 }
498 value_len = fp[n++]; 498 value_len = fp[n++];
499 IRDA_DEBUG(4, "%s(), strlen=%d\n", __FUNCTION__, value_len); 499 IRDA_DEBUG(4, "%s(), strlen=%d\n", __func__, value_len);
500 500
501 /* Make sure the string is null-terminated */ 501 /* Make sure the string is null-terminated */
502 fp[n+value_len] = 0x00; 502 fp[n+value_len] = 0x00;
@@ -526,7 +526,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
526 if (self->confirm) 526 if (self->confirm)
527 self->confirm(IAS_SUCCESS, obj_id, value, self->priv); 527 self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
528 else { 528 else {
529 IRDA_DEBUG(0, "%s(), missing handler!\n", __FUNCTION__); 529 IRDA_DEBUG(0, "%s(), missing handler!\n", __func__);
530 irias_delete_value(value); 530 irias_delete_value(value);
531 } 531 }
532} 532}
@@ -548,7 +548,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
548 __be16 tmp_be16; 548 __be16 tmp_be16;
549 __u8 *fp; 549 __u8 *fp;
550 550
551 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 551 IRDA_DEBUG(4, "%s()\n", __func__);
552 552
553 IRDA_ASSERT(self != NULL, return;); 553 IRDA_ASSERT(self != NULL, return;);
554 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 554 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -610,12 +610,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
610 memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; 610 memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
611 break; 611 break;
612 case IAS_MISSING: 612 case IAS_MISSING:
613 IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __FUNCTION__); 613 IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __func__);
614 skb_put(tx_skb, 1); 614 skb_put(tx_skb, 1);
615 fp[n++] = value->type; 615 fp[n++] = value->type;
616 break; 616 break;
617 default: 617 default:
618 IRDA_DEBUG(0, "%s(), type not implemented!\n", __FUNCTION__); 618 IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__);
619 break; 619 break;
620 } 620 }
621 iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb); 621 iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb);
@@ -642,7 +642,7 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
642 __u8 *fp; 642 __u8 *fp;
643 int n; 643 int n;
644 644
645 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 645 IRDA_DEBUG(4, "%s()\n", __func__);
646 646
647 IRDA_ASSERT(self != NULL, return;); 647 IRDA_ASSERT(self != NULL, return;);
648 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 648 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -697,7 +697,7 @@ void iriap_send_ack(struct iriap_cb *self)
697 struct sk_buff *tx_skb; 697 struct sk_buff *tx_skb;
698 __u8 *frame; 698 __u8 *frame;
699 699
700 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 700 IRDA_DEBUG(2, "%s()\n", __func__);
701 701
702 IRDA_ASSERT(self != NULL, return;); 702 IRDA_ASSERT(self != NULL, return;);
703 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 703 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -728,7 +728,7 @@ void iriap_connect_request(struct iriap_cb *self)
728 self->saddr, self->daddr, 728 self->saddr, self->daddr,
729 NULL, NULL); 729 NULL, NULL);
730 if (ret < 0) { 730 if (ret < 0) {
731 IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); 731 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
732 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); 732 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
733 } 733 }
734} 734}
@@ -776,7 +776,7 @@ static void iriap_connect_indication(void *instance, void *sap,
776{ 776{
777 struct iriap_cb *self, *new; 777 struct iriap_cb *self, *new;
778 778
779 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 779 IRDA_DEBUG(1, "%s()\n", __func__);
780 780
781 self = (struct iriap_cb *) instance; 781 self = (struct iriap_cb *) instance;
782 782
@@ -787,14 +787,14 @@ static void iriap_connect_indication(void *instance, void *sap,
787 /* Start new server */ 787 /* Start new server */
788 new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); 788 new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
789 if (!new) { 789 if (!new) {
790 IRDA_DEBUG(0, "%s(), open failed\n", __FUNCTION__); 790 IRDA_DEBUG(0, "%s(), open failed\n", __func__);
791 goto out; 791 goto out;
792 } 792 }
793 793
794 /* Now attach up the new "socket" */ 794 /* Now attach up the new "socket" */
795 new->lsap = irlmp_dup(self->lsap, new); 795 new->lsap = irlmp_dup(self->lsap, new);
796 if (!new->lsap) { 796 if (!new->lsap) {
797 IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__); 797 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
798 goto out; 798 goto out;
799 } 799 }
800 800
@@ -824,7 +824,7 @@ static int iriap_data_indication(void *instance, void *sap,
824 __u8 *frame; 824 __u8 *frame;
825 __u8 opcode; 825 __u8 opcode;
826 826
827 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 827 IRDA_DEBUG(3, "%s()\n", __func__);
828 828
829 self = (struct iriap_cb *) instance; 829 self = (struct iriap_cb *) instance;
830 830
@@ -836,7 +836,7 @@ static int iriap_data_indication(void *instance, void *sap,
836 836
837 if (self->mode == IAS_SERVER) { 837 if (self->mode == IAS_SERVER) {
838 /* Call server */ 838 /* Call server */
839 IRDA_DEBUG(4, "%s(), Calling server!\n", __FUNCTION__); 839 IRDA_DEBUG(4, "%s(), Calling server!\n", __func__);
840 iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); 840 iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb);
841 goto out; 841 goto out;
842 } 842 }
@@ -844,13 +844,13 @@ static int iriap_data_indication(void *instance, void *sap,
844 if (~opcode & IAP_LST) { 844 if (~opcode & IAP_LST) {
845 IRDA_WARNING("%s:, IrIAS multiframe commands or " 845 IRDA_WARNING("%s:, IrIAS multiframe commands or "
846 "results is not implemented yet!\n", 846 "results is not implemented yet!\n",
847 __FUNCTION__); 847 __func__);
848 goto out; 848 goto out;
849 } 849 }
850 850
851 /* Check for ack frames since they don't contain any data */ 851 /* Check for ack frames since they don't contain any data */
852 if (opcode & IAP_ACK) { 852 if (opcode & IAP_ACK) {
853 IRDA_DEBUG(0, "%s() Got ack frame!\n", __FUNCTION__); 853 IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__);
854 goto out; 854 goto out;
855 } 855 }
856 856
@@ -868,7 +868,7 @@ static int iriap_data_indication(void *instance, void *sap,
868 iriap_getvaluebyclass_confirm(self, skb); 868 iriap_getvaluebyclass_confirm(self, skb);
869 break; 869 break;
870 case IAS_CLASS_UNKNOWN: 870 case IAS_CLASS_UNKNOWN:
871 IRDA_DEBUG(1, "%s(), No such class!\n", __FUNCTION__); 871 IRDA_DEBUG(1, "%s(), No such class!\n", __func__);
872 /* Finished, close connection! */ 872 /* Finished, close connection! */
873 iriap_disconnect_request(self); 873 iriap_disconnect_request(self);
874 874
@@ -881,7 +881,7 @@ static int iriap_data_indication(void *instance, void *sap,
881 self->priv); 881 self->priv);
882 break; 882 break;
883 case IAS_ATTRIB_UNKNOWN: 883 case IAS_ATTRIB_UNKNOWN:
884 IRDA_DEBUG(1, "%s(), No such attribute!\n", __FUNCTION__); 884 IRDA_DEBUG(1, "%s(), No such attribute!\n", __func__);
885 /* Finished, close connection! */ 885 /* Finished, close connection! */
886 iriap_disconnect_request(self); 886 iriap_disconnect_request(self);
887 887
@@ -896,7 +896,7 @@ static int iriap_data_indication(void *instance, void *sap,
896 } 896 }
897 break; 897 break;
898 default: 898 default:
899 IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __FUNCTION__, 899 IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__,
900 opcode); 900 opcode);
901 break; 901 break;
902 } 902 }
@@ -918,7 +918,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
918 __u8 *fp; 918 __u8 *fp;
919 __u8 opcode; 919 __u8 opcode;
920 920
921 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 921 IRDA_DEBUG(4, "%s()\n", __func__);
922 922
923 IRDA_ASSERT(self != NULL, return;); 923 IRDA_ASSERT(self != NULL, return;);
924 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 924 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -929,7 +929,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
929 opcode = fp[0]; 929 opcode = fp[0];
930 if (~opcode & 0x80) { 930 if (~opcode & 0x80) {
931 IRDA_WARNING("%s: IrIAS multiframe commands or results " 931 IRDA_WARNING("%s: IrIAS multiframe commands or results "
932 "is not implemented yet!\n", __FUNCTION__); 932 "is not implemented yet!\n", __func__);
933 return; 933 return;
934 } 934 }
935 opcode &= 0x7f; /* Mask away LST bit */ 935 opcode &= 0x7f; /* Mask away LST bit */
@@ -937,7 +937,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
937 switch (opcode) { 937 switch (opcode) {
938 case GET_INFO_BASE: 938 case GET_INFO_BASE:
939 IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n", 939 IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n",
940 __FUNCTION__); 940 __func__);
941 break; 941 break;
942 case GET_VALUE_BY_CLASS: 942 case GET_VALUE_BY_CLASS:
943 iriap_getvaluebyclass_indication(self, skb); 943 iriap_getvaluebyclass_indication(self, skb);