diff options
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r-- | include/linux/hyperv.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 6c9336626592..93bd6fcd6e62 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -127,28 +127,6 @@ struct hv_ring_buffer_info { | |||
127 | u32 priv_read_index; | 127 | u32 priv_read_index; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | /* | ||
131 | * | ||
132 | * hv_get_ringbuffer_availbytes() | ||
133 | * | ||
134 | * Get number of bytes available to read and to write to | ||
135 | * for the specified ring buffer | ||
136 | */ | ||
137 | static inline void | ||
138 | hv_get_ringbuffer_availbytes(const struct hv_ring_buffer_info *rbi, | ||
139 | u32 *read, u32 *write) | ||
140 | { | ||
141 | u32 read_loc, write_loc, dsize; | ||
142 | |||
143 | /* Capture the read/write indices before they changed */ | ||
144 | read_loc = rbi->ring_buffer->read_index; | ||
145 | write_loc = rbi->ring_buffer->write_index; | ||
146 | dsize = rbi->ring_datasize; | ||
147 | |||
148 | *write = write_loc >= read_loc ? dsize - (write_loc - read_loc) : | ||
149 | read_loc - write_loc; | ||
150 | *read = dsize - *write; | ||
151 | } | ||
152 | 130 | ||
153 | static inline u32 hv_get_bytes_to_read(const struct hv_ring_buffer_info *rbi) | 131 | static inline u32 hv_get_bytes_to_read(const struct hv_ring_buffer_info *rbi) |
154 | { | 132 | { |