summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2017-06-25 22:30:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-21 18:55:07 +0300
commit27ba39f28808d6e983ad028da15952f29918a6c4 (patch)
tree1b8f7214bdc21835106fafdada013624ec2bfff8 /include
parentdf95afa5960b806835f2fa4d167a828d9329ba87 (diff)
downloadlinux-27ba39f28808d6e983ad028da15952f29918a6c4.tar.xz
vmbus: eliminate duplicate cached index
commit 05d00bc94ac27d220d8a78e365d7fa3a26dcca17 upstream. Don't need cached read index anymore now that packet iterator is used. The iterator has the original read index until the visible read_index is updated. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hyperv.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 8a1d29c431fa..3647085dab0a 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -127,7 +127,6 @@ struct hv_ring_buffer_info {
u32 ring_data_startoffset;
u32 priv_write_index;
u32 priv_read_index;
- u32 cached_read_index;
};
/*
@@ -180,19 +179,6 @@ static inline u32 hv_get_bytes_to_write(const struct hv_ring_buffer_info *rbi)
return write;
}
-static inline u32 hv_get_cached_bytes_to_write(
- const struct hv_ring_buffer_info *rbi)
-{
- u32 read_loc, write_loc, dsize, write;
-
- dsize = rbi->ring_datasize;
- read_loc = rbi->cached_read_index;
- write_loc = rbi->ring_buffer->write_index;
-
- write = write_loc >= read_loc ? dsize - (write_loc - read_loc) :
- read_loc - write_loc;
- return write;
-}
/*
* VMBUS version is 32 bit entity broken up into
* two 16 bit quantities: major_number. minor_number.