diff options
| author | Michael Ellerman <[email protected]> | 2020-09-17 12:20:16 +1000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2020-09-18 18:12:46 +1000 |
| commit | d208e13c6a2277d9fb71fad6a1394c70bdd7b634 (patch) | |
| tree | 4686a5943b9f0fe674ca4be137f6aa47ad6007ec /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | b5c8a2934eecbba3d688a911b98e92f8670ff462 (diff) | |
powerpc/process: Fix uninitialised variable error
Clang, and GCC with -Wmaybe-uninitialized, can't see that val is
unused in get_fpexec_mode():
arch/powerpc/kernel/process.c:1940:7: error: variable 'val' is used
uninitialized whenever 'if' condition is true
if (cpu_has_feature(CPU_FTR_SPE)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
We know that CPU_FTR_SPE will only be true iff CONFIG_SPE is also
true, but the compiler doesn't.
Avoid it by initialising val to zero.
Reported-by: kernel test robot <[email protected]>
Fixes: 532ed1900d37 ("powerpc/process: Remove useless #ifdef CONFIG_SPE")
Signed-off-by: Michael Ellerman <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Tested-by: Nick Desaulniers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions