diff options
author | Nathan Chancellor <nathan@kernel.org> | 2023-05-26 08:47:40 -0700 |
---|---|---|
committer | Dave Hansen <dave.hansen@linux.intel.com> | 2023-05-29 06:52:32 -0700 |
commit | 2fe1e67e6987b6f05329740da79c8150a2205b0d (patch) | |
tree | 5dba4fe5eefe76b240c385bfe7a36c1242cc184a /sound | |
parent | 688eb8191b475db5acfd48634600b04fd3dda9ad (diff) | |
download | linux-2fe1e67e6987b6f05329740da79c8150a2205b0d.tar.gz linux-2fe1e67e6987b6f05329740da79c8150a2205b0d.tar.bz2 linux-2fe1e67e6987b6f05329740da79c8150a2205b0d.zip |
x86/csum: Fix clang -Wuninitialized in csum_partial()
Clang warns:
arch/x86/lib/csum-partial_64.c:74:20: error: variable 'result' is uninitialized when used here [-Werror,-Wuninitialized]
return csum_tail(result, temp64, odd);
^~~~~~
arch/x86/lib/csum-partial_64.c:48:22: note: initialize the variable 'result' to silence this warning
unsigned odd, result;
^
= 0
1 error generated.
The only initialization and uses of result in csum_partial() were moved
into csum_tail() but result is still being passed by value to
csum_tail() (clang's -Wuninitialized does not do interprocedural
analysis to realize that result is always assigned in csum_tail()
however). Sink the declaration of result into csum_tail() to clear up
the warning.
Closes: https://lore.kernel.org/202305262039.3HUYjWJk-lkp@intel.com/
Fixes: 688eb8191b47 ("x86/csum: Improve performance of `csum_partial`")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20230526-csum_partial-wuninitialized-v1-1-ebc0108dcec1%40kernel.org
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions