Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751866AbdLAR3U (ORCPT ); Fri, 1 Dec 2017 12:29:20 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38165 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbdLAR3S (ORCPT ); Fri, 1 Dec 2017 12:29:18 -0500 X-Google-Smtp-Source: AGs4zMZAxwkQqawB1g3WhZQBT3TE1suKwK5mYnGj4as02LYCgBEMvltfJuO72qL5P/+/E+hgLMeXYw== Date: Fri, 1 Dec 2017 09:29:04 -0800 From: Stephen Hemminger To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, x86@kernel.org, Stephen Hemminger , Radim =?UTF-8?B?S3LEjW3DocWZ?= , Haiyang Zhang , linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, Ingo Molnar , Andy Lutomirski , "H. Peter Anvin" , Paolo Bonzini , Thomas Gleixner Subject: Re: [PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously Message-ID: <20171201092904.30d9831f@xeon-e3> In-Reply-To: <20171201131321.918-3-vkuznets@redhat.com> References: <20171201131321.918-1-vkuznets@redhat.com> <20171201131321.918-3-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 315 Lines: 12 On Fri, 1 Dec 2017 14:13:17 +0100 Vitaly Kuznetsov wrote: > + > +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg, > + u64 *cur_tsc) > +{ > + *cur_tsc = rdtsc(); > + > + return cur_tsc; Why do return and setting by reference. Looks like an ugly API.