aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorDu, Changbin <changbin.du@intel.com>2016-05-19 20:09:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 22:12:14 -0400
commite3252464da222ef2c2ca52dff383a824080ea3d5 (patch)
treeb6fc938b59104bf39dec182ca88da1db3f4e5b32 /kernel/time
parent02a982a6ec631d871571f940ca13817551759884 (diff)
timer: update debugobjects fixup callbacks return type
Update the return type to use bool instead of int, corresponding to cheange (debugobjects: make fixup functions return bool instead of int). Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/hrtimer.c18
-rw-r--r--kernel/time/timer.c30
2 files changed, 24 insertions, 24 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index fa0b983290cf..f962a58c0957 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -334,7 +334,7 @@ static void *hrtimer_debug_hint(void *addr)
334 * fixup_init is called when: 334 * fixup_init is called when:
335 * - an active object is initialized 335 * - an active object is initialized
336 */ 336 */
337static int hrtimer_fixup_init(void *addr, enum debug_obj_state state) 337static bool hrtimer_fixup_init(void *addr, enum debug_obj_state state)
338{ 338{
339 struct hrtimer *timer = addr; 339 struct hrtimer *timer = addr;
340 340
@@ -342,9 +342,9 @@ static int hrtimer_fixup_init(void *addr, enum debug_obj_state state)
342 case ODEBUG_STATE_ACTIVE: 342 case ODEBUG_STATE_ACTIVE:
343 hrtimer_cancel(timer); 343 hrtimer_cancel(timer);
344 debug_object_init(timer, &hrtimer_debug_descr); 344 debug_object_init(timer, &hrtimer_debug_descr);
345 return 1; 345 return true;
346 default: 346 default:
347 return 0; 347 return false;
348 } 348 }
349} 349}
350 350
@@ -353,19 +353,19 @@ static int hrtimer_fixup_init(void *addr, enum debug_obj_state state)
353 * - an active object is activated 353 * - an active object is activated
354 * - an unknown object is activated (might be a statically initialized object) 354 * - an unknown object is activated (might be a statically initialized object)
355 */ 355 */
356static int hrtimer_fixup_activate(void *addr, enum debug_obj_state state) 356static bool hrtimer_fixup_activate(void *addr, enum debug_obj_state state)
357{ 357{
358 switch (state) { 358 switch (state) {
359 359
360 case ODEBUG_STATE_NOTAVAILABLE: 360 case ODEBUG_STATE_NOTAVAILABLE:
361 WARN_ON_ONCE(1); 361 WARN_ON_ONCE(1);
362 return 0; 362 return false;
363 363
364 case ODEBUG_STATE_ACTIVE: 364 case ODEBUG_STATE_ACTIVE:
365 WARN_ON(1); 365 WARN_ON(1);
366 366
367 default: 367 default:
368 return 0; 368 return false;
369 } 369 }
370} 370}
371 371
@@ -373,7 +373,7 @@ static int hrtimer_fixup_activate(void *addr, enum debug_obj_state state)
373 * fixup_free is called when: 373 * fixup_free is called when:
374 * - an active object is freed 374 * - an active object is freed
375 */ 375 */
376static int hrtimer_fixup_free(void *addr, enum debug_obj_state state) 376static bool hrtimer_fixup_free(void *addr, enum debug_obj_state state)
377{ 377{
378 struct hrtimer *timer = addr; 378 struct hrtimer *timer = addr;
379 379
@@ -381,9 +381,9 @@ static int hrtimer_fixup_free(void *addr, enum debug_obj_state state)
381 case ODEBUG_STATE_ACTIVE: 381 case ODEBUG_STATE_ACTIVE:
382 hrtimer_cancel(timer); 382 hrtimer_cancel(timer);
383 debug_object_free(timer, &hrtimer_debug_descr); 383 debug_object_free(timer, &hrtimer_debug_descr);
384 return 1; 384 return true;
385 default: 385 default:
386 return 0; 386 return false;
387 } 387 }
388} 388}
389 389
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 73164c3aa56b..be33481a4da1 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -493,7 +493,7 @@ static void *timer_debug_hint(void *addr)
493 * fixup_init is called when: 493 * fixup_init is called when:
494 * - an active object is initialized 494 * - an active object is initialized
495 */ 495 */
496static int timer_fixup_init(void *addr, enum debug_obj_state state) 496static bool timer_fixup_init(void *addr, enum debug_obj_state state)
497{ 497{
498 struct timer_list *timer = addr; 498 struct timer_list *timer = addr;
499 499
@@ -501,9 +501,9 @@ static int timer_fixup_init(void *addr, enum debug_obj_state state)
501 case ODEBUG_STATE_ACTIVE: 501 case ODEBUG_STATE_ACTIVE:
502 del_timer_sync(timer); 502 del_timer_sync(timer);
503 debug_object_init(timer, &timer_debug_descr); 503 debug_object_init(timer, &timer_debug_descr);
504 return 1; 504 return true;
505 default: 505 default:
506 return 0; 506 return false;
507 } 507 }
508} 508}
509 509
@@ -518,7 +518,7 @@ static void stub_timer(unsigned long data)
518 * - an active object is activated 518 * - an active object is activated
519 * - an unknown object is activated (might be a statically initialized object) 519 * - an unknown object is activated (might be a statically initialized object)
520 */ 520 */
521static int timer_fixup_activate(void *addr, enum debug_obj_state state) 521static bool timer_fixup_activate(void *addr, enum debug_obj_state state)
522{ 522{
523 struct timer_list *timer = addr; 523 struct timer_list *timer = addr;
524 524
@@ -534,18 +534,18 @@ static int timer_fixup_activate(void *addr, enum debug_obj_state state)
534 timer->entry.next == TIMER_ENTRY_STATIC) { 534 timer->entry.next == TIMER_ENTRY_STATIC) {
535 debug_object_init(timer, &timer_debug_descr); 535 debug_object_init(timer, &timer_debug_descr);
536 debug_object_activate(timer, &timer_debug_descr); 536 debug_object_activate(timer, &timer_debug_descr);
537 return 0; 537 return false;
538 } else { 538 } else {
539 setup_timer(timer, stub_timer, 0); 539 setup_timer(timer, stub_timer, 0);
540 return 1; 540 return true;
541 } 541 }
542 return 0; 542 return false;
543 543
544 case ODEBUG_STATE_ACTIVE: 544 case ODEBUG_STATE_ACTIVE:
545 WARN_ON(1); 545 WARN_ON(1);
546 546
547 default: 547 default:
548 return 0; 548 return false;
549 } 549 }
550} 550}
551 551
@@ -553,7 +553,7 @@ static int timer_fixup_activate(void *addr, enum debug_obj_state state)
553 * fixup_free is called when: 553 * fixup_free is called when:
554 * - an active object is freed 554 * - an active object is freed
555 */ 555 */
556static int timer_fixup_free(void *addr, enum debug_obj_state state) 556static bool timer_fixup_free(void *addr, enum debug_obj_state state)
557{ 557{
558 struct timer_list *timer = addr; 558 struct timer_list *timer = addr;
559 559
@@ -561,9 +561,9 @@ static int timer_fixup_free(void *addr, enum debug_obj_state state)
561 case ODEBUG_STATE_ACTIVE: 561 case ODEBUG_STATE_ACTIVE:
562 del_timer_sync(timer); 562 del_timer_sync(timer);
563 debug_object_free(timer, &timer_debug_descr); 563 debug_object_free(timer, &timer_debug_descr);
564 return 1; 564 return true;
565 default: 565 default:
566 return 0; 566 return false;
567 } 567 }
568} 568}
569 569
@@ -571,7 +571,7 @@ static int timer_fixup_free(void *addr, enum debug_obj_state state)
571 * fixup_assert_init is called when: 571 * fixup_assert_init is called when:
572 * - an untracked/uninit-ed object is found 572 * - an untracked/uninit-ed object is found
573 */ 573 */
574static int timer_fixup_assert_init(void *addr, enum debug_obj_state state) 574static bool timer_fixup_assert_init(void *addr, enum debug_obj_state state)
575{ 575{
576 struct timer_list *timer = addr; 576 struct timer_list *timer = addr;
577 577
@@ -584,13 +584,13 @@ static int timer_fixup_assert_init(void *addr, enum debug_obj_state state)
584 * is tracked in the object tracker. 584 * is tracked in the object tracker.
585 */ 585 */
586 debug_object_init(timer, &timer_debug_descr); 586 debug_object_init(timer, &timer_debug_descr);
587 return 0; 587 return false;
588 } else { 588 } else {
589 setup_timer(timer, stub_timer, 0); 589 setup_timer(timer, stub_timer, 0);
590 return 1; 590 return true;
591 } 591 }
592 default: 592 default:
593 return 0; 593 return false;
594 } 594 }
595} 595}
596 596