[llvmlinux] [PATCH] sched/fair: disable clang -Wconstant-logical-operand

Philipp K philipp97kl at gmail.com
Tue Aug 28 10:27:44 UTC 2018


Am Mo., 27. Aug. 2018 um 21:15 Uhr schrieb Peter Zijlstra <
peterz at infradead.org>:

>
> It's just one config that produces the warning. IMO the warning is
> pretty useless.
>
> That said; I never got a response on:
>
>
> https://lkml.kernel.org/r/20180420165139.GP4064@hirez.programming.kicks-ass.net
>
> which asked if:
>
>   #define sched_feat(x) !!(sysctl_sched_features & (1UL <<
> __SCHED_FEAT_##x))
>
> would work, since that casts to a bool.
>

I'm sorry for not answering to the question before. I thought you would
also consider this one ugly.
I've just tested it (again with v4.16-rc5) and it fixes the warning.

Philipp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20180828/aee339d8/attachment-0001.html>


More information about the LLVMLinux mailing list