sched/core: Simplify code by removing duplicate #ifdefs
authorShrikanth Hegde <sshegde@linux.ibm.com>
Fri, 16 Feb 2024 06:14:33 +0000 (11:44 +0530)
committerIngo Molnar <mingo@kernel.org>
Fri, 16 Feb 2024 08:37:15 +0000 (09:37 +0100)
commit8cec3dd9e5930c82c6bd0af3fdb3a36bcd428310
treeebe7703f397ef831cf348e9c1e0cb6d6eca01b3d
parent841c35169323cd833294798e58b9bf63fa4fa1de
sched/core: Simplify code by removing duplicate #ifdefs

There's a few cases of nested #ifdefs in the scheduler code
that can be simplified:

  #ifdef DEFINE_A
  ...code block...
    #ifdef DEFINE_A       <-- This is a duplicate.
    ...code block...
    #endif
  #else
    #ifndef DEFINE_A     <-- This is also duplicate.
    ...code block...
    #endif
  #endif

More details about the script and methods used to find these code
patterns can be found at:

  https://lore.kernel.org/all/20240118080326.13137-1-sshegde@linux.ibm.com/

No change in functionality intended.

[ mingo: Clarified the changelog. ]

Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20240216061433.535522-1-sshegde@linux.ibm.com
kernel/sched/core.c
kernel/sched/fair.c