[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220520161022.5972-1-ggherdovich@suse.cz>
Date: Fri, 20 May 2022 18:10:21 +0200
From: Giovanni Gherdovich <ggherdovich@...e.cz>
To: Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
x86@...nel.org, linux-kernel@...r.kernel.org,
Giovanni Gherdovich <ggherdovich@...e.cz>
Subject: [PATCH 1/2] x86: Fix return value in frequency invariance setup for XEON_PHI_KNL/KNM
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@...cle.com>
Signed-off-by: Giovanni Gherdovich <ggherdovich@...e.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
Powered by blists - more mailing lists