diff options
| author | Nathan Chancellor <[email protected]> | 2019-12-05 00:50:50 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2019-12-05 03:44:12 +0000 |
| commit | ef70eff9dea66f38f8c2c2dcc7fe4b7a2bbb4921 (patch) | |
| tree | 61e800bf59d883c5f4e9954351dd4d6907f3c2f7 /lib/test_bitmap.c | |
| parent | kernel/notifier.c: remove blocking_notifier_chain_cond_register() (diff) | |
| download | kernel-ef70eff9dea66f38f8c2c2dcc7fe4b7a2bbb4921.tar.gz kernel-ef70eff9dea66f38f8c2c2dcc7fe4b7a2bbb4921.zip | |
kernel/profile.c: use cpumask_available to check for NULL cpumask
When building with clang + -Wtautological-pointer-compare, these
instances pop up:
kernel/profile.c:339:6: warning: comparison of array 'prof_cpu_mask' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (prof_cpu_mask != NULL)
^~~~~~~~~~~~~ ~~~~
kernel/profile.c:376:6: warning: comparison of array 'prof_cpu_mask' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (prof_cpu_mask != NULL)
^~~~~~~~~~~~~ ~~~~
kernel/profile.c:406:26: warning: comparison of array 'prof_cpu_mask' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (!user_mode(regs) && prof_cpu_mask != NULL &&
^~~~~~~~~~~~~ ~~~~
3 warnings generated.
This can be addressed with the cpumask_available helper, introduced in
commit f7e30f01a9e2 ("cpumask: Add helper cpumask_available()") to fix
warnings like this while keeping the code the same.
Link: https://github.com/ClangBuiltLinux/linux/issues/747
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_bitmap.c')
0 files changed, 0 insertions, 0 deletions
