mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Mateusz Nosek" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Mateusz Nosek <mateusznosek0@gmail.com>,
	Borislav Petkov <bp@suse.de>, x86 <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [tip: x86/cleanups] x86/tsc: Remove redundant assignment
Date: Wed, 22 Jan 2020 13:02:39 -0000	[thread overview]
Message-ID: <157969815944.396.7323567000945686325.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20200118171143.25178-1-mateusznosek0@gmail.com>

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     4144fddbd3932b59370e6e279002991c3e2b2fc6
Gitweb:        https://git.kernel.org/tip/4144fddbd3932b59370e6e279002991c3e2b2fc6
Author:        Mateusz Nosek <mateusznosek0@gmail.com>
AuthorDate:    Sat, 18 Jan 2020 18:11:43 +01:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Wed, 22 Jan 2020 13:52:42 +01:00

x86/tsc: Remove redundant assignment

Previously, the assignment to the local variable 'now' took place
before the for loop. The loop is unconditional so it will be entered
at least once. The variable 'now' is reassigned in the loop and is not
used before reassigning. Therefore, the assignment before the loop is
unnecessary and can be removed.

No code changed:

  # arch/x86/kernel/tsc_sync.o:

   text    data     bss     dec     hex filename
   3569     198      44    3811     ee3 tsc_sync.o.before
   3569     198      44    3811     ee3 tsc_sync.o.after

md5:
   36216de29b208edbcd34fed9fe7f7b69  tsc_sync.o.before.asm
   36216de29b208edbcd34fed9fe7f7b69  tsc_sync.o.after.asm

 [ bp: Massage commit message. ]

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200118171143.25178-1-mateusznosek0@gmail.com
---
 arch/x86/kernel/tsc_sync.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index b8acf63..32a8187 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -233,7 +233,6 @@ static cycles_t check_tsc_warp(unsigned int timeout)
 	 * The measurement runs for 'timeout' msecs:
 	 */
 	end = start + (cycles_t) tsc_khz * timeout;
-	now = start;
 
 	for (i = 0; ; i++) {
 		/*

      reply	other threads:[~2020-01-22 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18 17:11 [PATCH] arch/x86/kernel/tsc_sync.c: Clean up code by removing unused assignment mateusznosek0
2020-01-22 13:02 ` tip-bot2 for Mateusz Nosek [this message]

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=157969815944.396.7323567000945686325.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mateusznosek0@gmail.com \
    --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®