Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757026AbcDEGbb (ORCPT ); Tue, 5 Apr 2016 02:31:31 -0400 Received: from mail.skyhub.de ([78.46.96.112]:59776 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752172AbcDEG37 (ORCPT ); Tue, 5 Apr 2016 02:29:59 -0400 From: Borislav Petkov To: X86 ML Cc: LKML , Thomas Gleixner , Peter Zijlstra Subject: [PATCH 4/6] x86/tsc: Save an indentation level in recalibrate_cpu_khz() Date: Tue, 5 Apr 2016 08:29:53 +0200 Message-Id: <1459837795-2588-5-git-send-email-bp@alien8.de> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1459837795-2588-1-git-send-email-bp@alien8.de> References: <1459837795-2588-1-git-send-email-bp@alien8.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1081 Lines: 41 From: Borislav Petkov ... by flipping the check. Signed-off-by: Borislav Petkov Cc: Thomas Gleixner Cc: Peter Zijlstra --- arch/x86/kernel/tsc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 5bb702c77e8f..38ba6de56ede 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -834,15 +834,15 @@ int recalibrate_cpu_khz(void) #ifndef CONFIG_SMP unsigned long cpu_khz_old = cpu_khz; - if (boot_cpu_has(X86_FEATURE_TSC)) { - tsc_khz = x86_platform.calibrate_tsc(); - cpu_khz = tsc_khz; - cpu_data(0).loops_per_jiffy = - cpufreq_scale(cpu_data(0).loops_per_jiffy, - cpu_khz_old, cpu_khz); - return 0; - } else + if (!boot_cpu_has(X86_FEATURE_TSC)) return -ENODEV; + + tsc_khz = x86_platform.calibrate_tsc(); + cpu_khz = tsc_khz; + cpu_data(0).loops_per_jiffy = cpufreq_scale(cpu_data(0).loops_per_jiffy, + cpu_khz_old, cpu_khz); + + return 0; #else return -ENODEV; #endif -- 2.7.3