summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>2022-08-22 09:29:17 +0300
committerHans de Goede <hdegoede@redhat.com>2022-08-24 11:35:54 +0300
commitea522b806162ca947427f8305310d3c8a3d42d7a (patch)
tree0b5d28e555d8d42fde16a2bd65a96909ecdb07e9 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentc2f7edf81a82db20d91974ba2cf50a4c90c2dbe3 (diff)
downloadlinux-ea522b806162ca947427f8305310d3c8a3d42d7a.tar.xz
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 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions