From: Borislav Petkov <bp@suse.de>
To: Minfei Huang <mnghuan@gmail.com>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
luto@kernel.org, pbonzini@redhat.com, mtosatti@redhat.com,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Cleanup __pvclock_read_cycles to remove useless variables
Date: Sat, 30 Apr 2016 15:24:21 +0200 [thread overview]
Message-ID: <20160430132420.GA4084@pd.tnic> (raw)
In-Reply-To: <1461567194-2007-1-git-send-email-mnghuan@gmail.com>
On Mon, Apr 25, 2016 at 02:53:14PM +0800, 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);
You could go a step further and get rid of that
pvclock_get_nsec_offset() simple wrapper too and move its meat into
__pvclock_read_cycles()...
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
next prev parent reply other threads:[~2016-04-30 13:24 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
2016-04-30 13:24 ` Borislav Petkov [this message]
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=20160430132420.GA4084@pd.tnic \
--to=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mnghuan@gmail.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
Powered by JetHome