aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/irias_object.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/irias_object.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/irias_object.c')
-rw-r--r--net/irda/irias_object.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
index cbcf04380f3a..99ebb96f1386 100644
--- a/net/irda/irias_object.c
+++ b/net/irda/irias_object.c
@@ -47,12 +47,12 @@ struct ias_object *irias_new_object( char *name, int id)
47{ 47{
48 struct ias_object *obj; 48 struct ias_object *obj;
49 49
50 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 50 IRDA_DEBUG( 4, "%s()\n", __func__);
51 51
52 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); 52 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
53 if (obj == NULL) { 53 if (obj == NULL) {
54 IRDA_WARNING("%s(), Unable to allocate object!\n", 54 IRDA_WARNING("%s(), Unable to allocate object!\n",
55 __FUNCTION__); 55 __func__);
56 return NULL; 56 return NULL;
57 } 57 }
58 58
@@ -60,7 +60,7 @@ struct ias_object *irias_new_object( char *name, int id)
60 obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC); 60 obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC);
61 if (!obj->name) { 61 if (!obj->name) {
62 IRDA_WARNING("%s(), Unable to allocate name!\n", 62 IRDA_WARNING("%s(), Unable to allocate name!\n",
63 __FUNCTION__); 63 __func__);
64 kfree(obj); 64 kfree(obj);
65 return NULL; 65 return NULL;
66 } 66 }
@@ -73,7 +73,7 @@ struct ias_object *irias_new_object( char *name, int id)
73 73
74 if (obj->attribs == NULL) { 74 if (obj->attribs == NULL) {
75 IRDA_WARNING("%s(), Unable to allocate attribs!\n", 75 IRDA_WARNING("%s(), Unable to allocate attribs!\n",
76 __FUNCTION__); 76 __func__);
77 kfree(obj->name); 77 kfree(obj->name);
78 kfree(obj); 78 kfree(obj);
79 return NULL; 79 return NULL;
@@ -134,7 +134,7 @@ int irias_delete_object(struct ias_object *obj)
134 node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); 134 node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
135 if (!node) 135 if (!node)
136 IRDA_DEBUG( 0, "%s(), object already removed!\n", 136 IRDA_DEBUG( 0, "%s(), object already removed!\n",
137 __FUNCTION__); 137 __func__);
138 138
139 /* Destroy */ 139 /* Destroy */
140 __irias_delete_object(obj); 140 __irias_delete_object(obj);
@@ -268,7 +268,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
268 /* Find object */ 268 /* Find object */
269 obj = hashbin_lock_find(irias_objects, 0, obj_name); 269 obj = hashbin_lock_find(irias_objects, 0, obj_name);
270 if (obj == NULL) { 270 if (obj == NULL) {
271 IRDA_WARNING("%s: Unable to find object: %s\n", __FUNCTION__, 271 IRDA_WARNING("%s: Unable to find object: %s\n", __func__,
272 obj_name); 272 obj_name);
273 return -1; 273 return -1;
274 } 274 }
@@ -280,14 +280,14 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
280 attrib = hashbin_find(obj->attribs, 0, attrib_name); 280 attrib = hashbin_find(obj->attribs, 0, attrib_name);
281 if (attrib == NULL) { 281 if (attrib == NULL) {
282 IRDA_WARNING("%s: Unable to find attribute: %s\n", 282 IRDA_WARNING("%s: Unable to find attribute: %s\n",
283 __FUNCTION__, attrib_name); 283 __func__, attrib_name);
284 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); 284 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
285 return -1; 285 return -1;
286 } 286 }
287 287
288 if ( attrib->value->type != new_value->type) { 288 if ( attrib->value->type != new_value->type) {
289 IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n", 289 IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
290 __FUNCTION__); 290 __func__);
291 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); 291 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
292 return -1; 292 return -1;
293 } 293 }
@@ -322,7 +322,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
322 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); 322 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
323 if (attrib == NULL) { 323 if (attrib == NULL) {
324 IRDA_WARNING("%s: Unable to allocate attribute!\n", 324 IRDA_WARNING("%s: Unable to allocate attribute!\n",
325 __FUNCTION__); 325 __func__);
326 return; 326 return;
327 } 327 }
328 328
@@ -333,7 +333,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
333 attrib->value = irias_new_integer_value(value); 333 attrib->value = irias_new_integer_value(value);
334 if (!attrib->name || !attrib->value) { 334 if (!attrib->name || !attrib->value) {
335 IRDA_WARNING("%s: Unable to allocate attribute!\n", 335 IRDA_WARNING("%s: Unable to allocate attribute!\n",
336 __FUNCTION__); 336 __func__);
337 if (attrib->value) 337 if (attrib->value)
338 irias_delete_value(attrib->value); 338 irias_delete_value(attrib->value);
339 kfree(attrib->name); 339 kfree(attrib->name);
@@ -366,7 +366,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
366 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); 366 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
367 if (attrib == NULL) { 367 if (attrib == NULL) {
368 IRDA_WARNING("%s: Unable to allocate attribute!\n", 368 IRDA_WARNING("%s: Unable to allocate attribute!\n",
369 __FUNCTION__); 369 __func__);
370 return; 370 return;
371 } 371 }
372 372
@@ -376,7 +376,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
376 attrib->value = irias_new_octseq_value( octets, len); 376 attrib->value = irias_new_octseq_value( octets, len);
377 if (!attrib->name || !attrib->value) { 377 if (!attrib->name || !attrib->value) {
378 IRDA_WARNING("%s: Unable to allocate attribute!\n", 378 IRDA_WARNING("%s: Unable to allocate attribute!\n",
379 __FUNCTION__); 379 __func__);
380 if (attrib->value) 380 if (attrib->value)
381 irias_delete_value(attrib->value); 381 irias_delete_value(attrib->value);
382 kfree(attrib->name); 382 kfree(attrib->name);
@@ -408,7 +408,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
408 attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC); 408 attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
409 if (attrib == NULL) { 409 if (attrib == NULL) {
410 IRDA_WARNING("%s: Unable to allocate attribute!\n", 410 IRDA_WARNING("%s: Unable to allocate attribute!\n",
411 __FUNCTION__); 411 __func__);
412 return; 412 return;
413 } 413 }
414 414
@@ -418,7 +418,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
418 attrib->value = irias_new_string_value(value); 418 attrib->value = irias_new_string_value(value);
419 if (!attrib->name || !attrib->value) { 419 if (!attrib->name || !attrib->value) {
420 IRDA_WARNING("%s: Unable to allocate attribute!\n", 420 IRDA_WARNING("%s: Unable to allocate attribute!\n",
421 __FUNCTION__); 421 __func__);
422 if (attrib->value) 422 if (attrib->value)
423 irias_delete_value(attrib->value); 423 irias_delete_value(attrib->value);
424 kfree(attrib->name); 424 kfree(attrib->name);
@@ -442,7 +442,7 @@ struct ias_value *irias_new_integer_value(int integer)
442 442
443 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 443 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
444 if (value == NULL) { 444 if (value == NULL) {
445 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 445 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
446 return NULL; 446 return NULL;
447 } 447 }
448 448
@@ -467,7 +467,7 @@ struct ias_value *irias_new_string_value(char *string)
467 467
468 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 468 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
469 if (value == NULL) { 469 if (value == NULL) {
470 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 470 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
471 return NULL; 471 return NULL;
472 } 472 }
473 473
@@ -475,7 +475,7 @@ struct ias_value *irias_new_string_value(char *string)
475 value->charset = CS_ASCII; 475 value->charset = CS_ASCII;
476 value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC); 476 value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
477 if (!value->t.string) { 477 if (!value->t.string) {
478 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 478 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
479 kfree(value); 479 kfree(value);
480 return NULL; 480 return NULL;
481 } 481 }
@@ -498,7 +498,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
498 498
499 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 499 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
500 if (value == NULL) { 500 if (value == NULL) {
501 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 501 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
502 return NULL; 502 return NULL;
503 } 503 }
504 504
@@ -510,7 +510,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
510 510
511 value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC); 511 value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
512 if (value->t.oct_seq == NULL){ 512 if (value->t.oct_seq == NULL){
513 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 513 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
514 kfree(value); 514 kfree(value);
515 return NULL; 515 return NULL;
516 } 516 }
@@ -523,7 +523,7 @@ struct ias_value *irias_new_missing_value(void)
523 523
524 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 524 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
525 if (value == NULL) { 525 if (value == NULL) {
526 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 526 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
527 return NULL; 527 return NULL;
528 } 528 }
529 529
@@ -540,7 +540,7 @@ struct ias_value *irias_new_missing_value(void)
540 */ 540 */
541void irias_delete_value(struct ias_value *value) 541void irias_delete_value(struct ias_value *value)
542{ 542{
543 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 543 IRDA_DEBUG(4, "%s()\n", __func__);
544 544
545 IRDA_ASSERT(value != NULL, return;); 545 IRDA_ASSERT(value != NULL, return;);
546 546
@@ -558,7 +558,7 @@ void irias_delete_value(struct ias_value *value)
558 kfree(value->t.oct_seq); 558 kfree(value->t.oct_seq);
559 break; 559 break;
560 default: 560 default:
561 IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__); 561 IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__);
562 break; 562 break;
563 } 563 }
564 kfree(value); 564 kfree(value);