linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] x86: Fix return value in frequency invariance setup for XEON_PHI_KNL/KNM
@ 2022-05-20 16:10 Giovanni Gherdovich
  2022-05-20 16:10 ` [PATCH 2/2] x86: fix platform info detection in frequency invariance Giovanni Gherdovich
  2022-05-21 10:02 ` [PATCH 1/2] x86: Fix return value in frequency invariance setup for XEON_PHI_KNL/KNM Peter Zijlstra
  0 siblings, 2 replies; 6+ messages in thread
From: Giovanni Gherdovich @ 2022-05-20 16:10 UTC (permalink / raw)
  To: Borislav Petkov, Ingo Molnar, Peter Zijlstra, Dave Hansen,
	Thomas Gleixner
  Cc: Rafael J . Wysocki, Dan Carpenter, Srinivas Pandruvada, x86,
	linux-kernel, Giovanni Gherdovich

knl_set_max_freq_ratio() should return true on success and false
otherwise. If the last line of the function body is reached, it means no
appropriate value for turbo_freq was found: the setup is unsuccessful and
it should return false.

Fixes: 8bea0dfb4a82 ("x86, sched: Add support for frequency invariance on XEON_PHI_KNL/KNM")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz>
---
 arch/x86/kernel/smpboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2ef14772dc04..225a3c31297c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1985,7 +1985,7 @@ static bool knl_set_max_freq_ratio(u64 *base_freq, u64 *turbo_freq,
 		i += 8;
 	} while (i < 64);
 
-	return true;
+	return false;
 }
 
 static bool skx_set_max_freq_ratio(u64 *base_freq, u64 *turbo_freq, int size)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-23  9:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 16:10 [PATCH 1/2] x86: Fix return value in frequency invariance setup for XEON_PHI_KNL/KNM Giovanni Gherdovich
2022-05-20 16:10 ` [PATCH 2/2] x86: fix platform info detection in frequency invariance Giovanni Gherdovich
2022-05-20 16:44   ` Dave Hansen
2022-05-23  9:56     ` Giovanni Gherdovich
2022-05-21 10:02 ` [PATCH 1/2] x86: Fix return value in frequency invariance setup for XEON_PHI_KNL/KNM Peter Zijlstra
2022-05-23  9:57   ` Giovanni Gherdovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).