Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da1bc946 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Satya Durga Srinivasu Prabhala
Browse files

sched/debug: Explicitly cast sched_feat() to bool



LLVM has a warning that tags expressions like:

	if (foo && non-bool-const)

This pattern triggers for CONFIG_SCHED_DEBUG=n where sched_feat() ends
up being whatever bit we select. Avoid the warning with an explicit
cast to bool.

Change-Id: I668e085a29deb6330eb5c820012f1c9663d71b24
Reported-by: default avatarPhilipp Klocke <philipp97kl@gmail.com>
Tested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Git-commit: 7e6f4c5d600c1c8e2a1d900e65cab319d9b6782e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[satyap@codeaurora.org: trivial merge conflict resolution]
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent f9d020d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1400,7 +1400,7 @@ static __always_inline bool static_branch_##name(struct static_key *key) \
extern struct static_key sched_feat_keys[__SCHED_FEAT_NR];
#define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x]))
#else /* !(SCHED_DEBUG && HAVE_JUMP_LABEL) */
#define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
#define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
#endif /* SCHED_DEBUG && HAVE_JUMP_LABEL */

extern struct static_key_false sched_numa_balancing;