Commit 460c45f4 authored by Tiffany Yang's avatar Tiffany Yang
Browse files

ANDROID: Fix sched/core.o 'if' clause build error



A conditional tracepoint originally introduced in
commit 6a878921 ("ANDROID: sched: move
blocked reason trace point to cover all class") was not indented to be
in-line with the other relevant code blocks after a scoped_guard was
placed around them in commit 857d315f
("sched: Simplify ttwu()"). This didn't cause any issues until an #ifdef
in between the conditional and the subsequent line was removed in
commit d0a0a055 ("sched/smp: Use the SMP
version of try_to_wake_up()").

Indent the conditional to prevent the following kernelci build error:

kernel/sched/core.c: In function ‘try_to_wake_up’:
kernel/sched/core.c:4319:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 4319 |         if (READ_ONCE(p->__state) & TASK_UNINTERRUPTIBLE)
      |         ^~
In file included from ./arch/arm64/include/asm/barrier.h:219,
                 from ./include/linux/list.h:11,
                 from ./include/linux/wait.h:7,
                 from ./include/linux/wait_bit.h:8,
                 from ./include/linux/fs.h:7,
                 from ./include/linux/highmem.h:5,
                 from kernel/sched/core.c:10:
./include/asm-generic/barrier.h:103:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  103 | #define smp_rmb()       do { kcsan_rmb(); __smp_rmb(); } while (0)
      |                         ^~
./include/asm-generic/barrier.h:232:49: note: in expansion of macro ‘smp_rmb’
  232 | #define smp_acquire__after_ctrl_dep()           smp_rmb()
      |                                                 ^~~~~~~
kernel/sched/core.c:4345:17: note: in expansion of macro ‘smp_acquire__after_ctrl_dep’
 4345 |                 smp_acquire__after_ctrl_dep();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: e2c72158 ("Revert "ANDROID: Fix invalid caller output in
trace_sched_blocked_reason"")
Change-Id: I2fb5fec93e0ffe7541a354e40808225f6e975ba2
Signed-off-by: default avatarTiffany Yang <ynaffit@google.com>
parent b2281581
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment