Commit 4713eb7b authored by Kimberly Brown's avatar Kimberly Brown Committed by Sasha Levin

Drivers: hv: vmbus: Set ring_info field to 0 and remove memset

Set "ring_info->priv_read_index" to 0. Now, all of ring_info's fields
are explicitly set in this function. The memset() call is no longer
necessary, so remove it.
Signed-off-by: default avatarKimberly Brown <kimbrownkd@gmail.com>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fcedbb29
...@@ -197,8 +197,6 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, ...@@ -197,8 +197,6 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,
BUILD_BUG_ON((sizeof(struct hv_ring_buffer) != PAGE_SIZE)); BUILD_BUG_ON((sizeof(struct hv_ring_buffer) != PAGE_SIZE));
memset(ring_info, 0, sizeof(struct hv_ring_buffer_info));
/* /*
* First page holds struct hv_ring_buffer, do wraparound mapping for * First page holds struct hv_ring_buffer, do wraparound mapping for
* the rest. * the rest.
...@@ -232,6 +230,7 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, ...@@ -232,6 +230,7 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,
reciprocal_value(ring_info->ring_size / 10); reciprocal_value(ring_info->ring_size / 10);
ring_info->ring_datasize = ring_info->ring_size - ring_info->ring_datasize = ring_info->ring_size -
sizeof(struct hv_ring_buffer); sizeof(struct hv_ring_buffer);
ring_info->priv_read_index = 0;
spin_lock_init(&ring_info->ring_lock); spin_lock_init(&ring_info->ring_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment