From: Minfei Huang <mnghuan@gmail.com>
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
Subject: Re: [PATCH] Cleanup __pvclock_read_cycles to remove useless variables
Date: Sat, 30 Apr 2016 18:12:20 +0800 [thread overview]
Message-ID: <20160430101220.GA27909@huangminfeis-MacBook-Pro.local> (raw)
In-Reply-To: <1461567194-2007-1-git-send-email-mnghuan@gmail.com>
ping.
Any comment is appreciate.
Thanks
Minfei
On 04/25/16 at 02:53P, Minfei Huang wrote:
> The value of cycles and flags can be assigned directly without
> intermediate variables.
>
> Remove the useless variables.
>
> Signed-off-by: Minfei Huang <mnghuan@gmail.com>
> ---
> 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
>
next prev parent reply other threads:[~2016-04-30 10:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 6:53 Minfei Huang
2016-04-30 10:12 ` Minfei Huang [this message]
2016-04-30 13:24 ` Borislav Petkov
2016-04-30 17:47 ` Andy Lutomirski
2016-04-30 19:17 ` Borislav Petkov
2016-04-30 21:57 ` Andy Lutomirski
2016-05-11 14:24 ` Paolo Bonzini
2016-05-11 15:19 ` Minfei Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160430101220.GA27909@huangminfeis-MacBook-Pro.local \
--to=mnghuan@gmail.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®