Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753558AbcDYGxW (ORCPT ); Mon, 25 Apr 2016 02:53:22 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34041 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbcDYGxU (ORCPT ); Mon, 25 Apr 2016 02:53:20 -0400 From: Minfei Huang To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, luto@kernel.org, pbonzini@redhat.com, bp@suse.de, mtosatti@redhat.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Minfei Huang Subject: [PATCH] Cleanup __pvclock_read_cycles to remove useless variables Date: Mon, 25 Apr 2016 14:53:14 +0800 Message-Id: <1461567194-2007-1-git-send-email-mnghuan@gmail.com> X-Mailer: git-send-email 2.6.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 40 The value of cycles and flags can be assigned directly without intermediate variables. Remove the useless variables. Signed-off-by: Minfei Huang --- arch/x86/include/asm/pvclock.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h index fdcc040..fb95dac 100644 --- a/arch/x86/include/asm/pvclock.h +++ b/arch/x86/include/asm/pvclock.h @@ -80,19 +80,12 @@ static __always_inline unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, cycle_t *cycles, u8 *flags) { - unsigned version; - cycle_t ret, offset; - u8 ret_flags; - - version = src->version; + cycle_t offset; offset = pvclock_get_nsec_offset(src); - ret = src->system_time + offset; - ret_flags = src->flags; - - *cycles = ret; - *flags = ret_flags; - return version; + *cycles = src->system_time + offset; + *flags = src->flags; + return src->version; } struct pvclock_vsyscall_time_info { -- 2.6.3