lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1516774890-5134-1-git-send-email-Tianyu.Lan@microsoft.com>
Date:   Wed, 24 Jan 2018 14:21:30 +0800
From:   lantianyu1986@...il.com
To:     unlisted-recipients:; (no To-header on input)
Cc:     Tianyu Lan <Tianyu.Lan@...rosoft.com>, kys@...rosoft.com,
        haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        devel@...uxdriverproject.org, linux-kernel@...r.kernel.org
Subject: [Patch] vmbus: Simply hv_get_next_write_location() function

From: Tianyu Lan <Tianyu.Lan@...rosoft.com>

The "next" variable is redundant in hv_get_next_write_location().
This patch is to remove it and return write_index directly.

Signed-off-by: Tianyu Lan <Tianyu.Lan@...rosoft.com>
---
 drivers/hv/ring_buffer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
index 12eb8ca..71558e7 100644
--- a/drivers/hv/ring_buffer.c
+++ b/drivers/hv/ring_buffer.c
@@ -82,9 +82,7 @@ static void hv_signal_on_write(u32 old_write, struct vmbus_channel *channel)
 static inline u32
 hv_get_next_write_location(struct hv_ring_buffer_info *ring_info)
 {
-	u32 next = ring_info->ring_buffer->write_index;
-
-	return next;
+	return ring_info->ring_buffer->write_index;
 }
 
 /* Set the next write location for the specified ring buffer. */
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ