Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Change variable type as bool for clean-up

The wakeup_rt wakeup_dl, tracing_dl is only set to 0, 1.
So changing type of wakeup_rt wakeup_dl, tracing_dl as bool
makes relevant routine be more readable.

Link: https://lkml.kernel.org/r/20210629140548.GA1627@raspberrypi

Signed-off-by: Austin Kim <austin.kim@lge.com>
[ Removed unneeded initialization of static bool tracing_dl ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Austin Kim and committed by
Steven Rostedt (VMware)
bfbf8d15 6a82f42a

+12 -12
+12 -12
kernel/trace/trace_sched_wakeup.c
··· 26 26 static int wakeup_cpu; 27 27 static int wakeup_current_cpu; 28 28 static unsigned wakeup_prio = -1; 29 - static int wakeup_rt; 30 - static int wakeup_dl; 31 - static int tracing_dl = 0; 29 + static bool wakeup_rt; 30 + static bool wakeup_dl; 31 + static bool tracing_dl; 32 32 33 33 static arch_spinlock_t wakeup_lock = 34 34 (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; ··· 498 498 { 499 499 wakeup_cpu = -1; 500 500 wakeup_prio = -1; 501 - tracing_dl = 0; 501 + tracing_dl = false; 502 502 503 503 if (wakeup_task) 504 504 put_task_struct(wakeup_task); ··· 572 572 * another task until the first one wakes up. 573 573 */ 574 574 if (dl_task(p)) 575 - tracing_dl = 1; 575 + tracing_dl = true; 576 576 else 577 - tracing_dl = 0; 577 + tracing_dl = false; 578 578 579 579 wakeup_task = get_task_struct(p); 580 580 ··· 685 685 if (wakeup_busy) 686 686 return -EBUSY; 687 687 688 - wakeup_dl = 0; 689 - wakeup_rt = 0; 688 + wakeup_dl = false; 689 + wakeup_rt = false; 690 690 return __wakeup_tracer_init(tr); 691 691 } 692 692 ··· 695 695 if (wakeup_busy) 696 696 return -EBUSY; 697 697 698 - wakeup_dl = 0; 699 - wakeup_rt = 1; 698 + wakeup_dl = false; 699 + wakeup_rt = true; 700 700 return __wakeup_tracer_init(tr); 701 701 } 702 702 ··· 705 705 if (wakeup_busy) 706 706 return -EBUSY; 707 707 708 - wakeup_dl = 1; 709 - wakeup_rt = 0; 708 + wakeup_dl = true; 709 + wakeup_rt = false; 710 710 return __wakeup_tracer_init(tr); 711 711 } 712 712