aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2017-02-12 01:02:24 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-14 13:20:35 -0500
commite4165a0fad0963bf8b4a59f54d3360ccb6a6d1ea (patch)
treefb91d8f72f6c01e2779e2b0892202bade31907fa /include/linux
parent6e47dd3e2938f41d75045bbcb64aa9df3a463b2a (diff)
vmbus: constify parameters where possible
Functions that just query state of ring buffer can have parameters marked const. 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/linux')
-rw-r--r--include/linux/hyperv.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 08eb71a22c14..62bbf3c1aa4a 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -138,8 +138,8 @@ struct hv_ring_buffer_info {
138 * for the specified ring buffer 138 * for the specified ring buffer
139 */ 139 */
140static inline void 140static inline void
141hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi, 141hv_get_ringbuffer_availbytes(const struct hv_ring_buffer_info *rbi,
142 u32 *read, u32 *write) 142 u32 *read, u32 *write)
143{ 143{
144 u32 read_loc, write_loc, dsize; 144 u32 read_loc, write_loc, dsize;
145 145
@@ -153,7 +153,7 @@ hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi,
153 *read = dsize - *write; 153 *read = dsize - *write;
154} 154}
155 155
156static inline u32 hv_get_bytes_to_read(struct hv_ring_buffer_info *rbi) 156static inline u32 hv_get_bytes_to_read(const struct hv_ring_buffer_info *rbi)
157{ 157{
158 u32 read_loc, write_loc, dsize, read; 158 u32 read_loc, write_loc, dsize, read;
159 159
@@ -167,7 +167,7 @@ static inline u32 hv_get_bytes_to_read(struct hv_ring_buffer_info *rbi)
167 return read; 167 return read;
168} 168}
169 169
170static inline u32 hv_get_bytes_to_write(struct hv_ring_buffer_info *rbi) 170static inline u32 hv_get_bytes_to_write(const struct hv_ring_buffer_info *rbi)
171{ 171{
172 u32 read_loc, write_loc, dsize, write; 172 u32 read_loc, write_loc, dsize, write;
173 173
@@ -1448,9 +1448,9 @@ void vmbus_set_event(struct vmbus_channel *channel);
1448 1448
1449/* Get the start of the ring buffer. */ 1449/* Get the start of the ring buffer. */
1450static inline void * 1450static inline void *
1451hv_get_ring_buffer(struct hv_ring_buffer_info *ring_info) 1451hv_get_ring_buffer(const struct hv_ring_buffer_info *ring_info)
1452{ 1452{
1453 return (void *)ring_info->ring_buffer->buffer; 1453 return ring_info->ring_buffer->buffer;
1454} 1454}
1455 1455
1456/* 1456/*