Home
last modified time | relevance | path

Searched hist:ea522b806162ca947427f8305310d3c8a3d42d7a (Results 1 – 4 of 4) sorted by relevance

/linux/drivers/platform/x86/amd/pmf/
H A Dauto-mode.cdiff ea522b806162ca947427f8305310d3c8a3d42d7a Mon Aug 22 08:29:17 CEST 2022 Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 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>
H A Dsps.cdiff ea522b806162ca947427f8305310d3c8a3d42d7a Mon Aug 22 08:29:17 CEST 2022 Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 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>
H A Dpmf.hdiff ea522b806162ca947427f8305310d3c8a3d42d7a Mon Aug 22 08:29:17 CEST 2022 Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 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>
H A Dcore.cdiff ea522b806162ca947427f8305310d3c8a3d42d7a Mon Aug 22 08:29:17 CEST 2022 Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 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>