aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>2022-08-22 11:59:17 +0530
committerHans de Goede <hdegoede@redhat.com>2022-08-24 10:35:54 +0200
commitea522b806162ca947427f8305310d3c8a3d42d7a (patch)
tree0b5d28e555d8d42fde16a2bd65a96909ecdb07e9 /scripts/generate_rust_analyzer.py
parentplatform/x86/amd/pmf: Fix undefined reference to platform_profile (diff)
downloadwireguard-linux-ea522b806162ca947427f8305310d3c8a3d42d7a.tar.xz
wireguard-linux-ea522b806162ca947427f8305310d3c8a3d42d7a.zip
platform/x86/amd/pmf: Fix clang unused variable warning
variable 'mode' is used uninitialized whenever switch default is taken in sps.c which leads to the following clang warning. drivers/platform/x86/amd/pmf/sps.c:96:2: error: variable 'mode' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ drivers/platform/x86/amd/pmf/sps.c:101:9: note: uninitialized use occurs here return mode; ^~~~ drivers/platform/x86/amd/pmf/sps.c:84:9: note: initialize the variable 'mode' to silence this warning u8 mode; ^ = '\0' 1 error generated. Fix it by returning -EOPNOTSUPP in default case and also change the return type of the function amd_pmf_get_pprof_modes() to keep it similar like other drivers which implement platform_profile. Fixes: 4c71ae414474 ("platform/x86/amd/pmf: Add support SPS PMF feature") Reported-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20220822062917.4061503-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions