Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86/amd/pmf: Remove redundant ternary operators

For ternary operators in the form of "a ? true : false", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://lore.kernel.org/r/20250828122649.39574-1-liaoyuanhong@vivo.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Liao Yuanhong and committed by
Ilpo Järvinen
f4902538 a1912241

+1 -1
+1 -1
drivers/platform/x86/amd/pmf/sps.c
··· 283 283 284 284 bool is_pprof_balanced(struct amd_pmf_dev *pmf) 285 285 { 286 - return (pmf->current_profile == PLATFORM_PROFILE_BALANCED) ? true : false; 286 + return pmf->current_profile == PLATFORM_PROFILE_BALANCED; 287 287 } 288 288 289 289 static int amd_pmf_profile_get(struct device *dev,