diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-13 14:32:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 12:01:17 -0400 |
commit | 2c9be3eacc39948af2341595322c014833699ac5 (patch) | |
tree | 3d63dd025005f923ec4daa9ec9052494ee41ed7e /drivers/hv/vmbus_drv.c | |
parent | 4947c7453b184bc33a0056cf95af61c3cad11ef6 (diff) |
hv: delete vmbus_get_debug_info()
It's only used once, only contains 2 function calls, so just make those
calls directly, deleting the function, and the now unneeded structure
entirely.
Tested-by: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/vmbus_drv.c')
-rw-r--r-- | drivers/hv/vmbus_drv.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 73cb456e256b..62d9311b0541 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c | |||
@@ -63,29 +63,26 @@ static int vmbus_exists(void) | |||
63 | static void get_channel_info(struct hv_device *device, | 63 | static void get_channel_info(struct hv_device *device, |
64 | struct hv_device_info *info) | 64 | struct hv_device_info *info) |
65 | { | 65 | { |
66 | struct vmbus_channel_debug_info debug_info; | 66 | struct hv_ring_buffer_debug_info inbound; |
67 | struct hv_ring_buffer_debug_info outbound; | ||
67 | 68 | ||
68 | if (!device->channel) | 69 | if (!device->channel) |
69 | return; | 70 | return; |
70 | 71 | ||
71 | vmbus_get_debug_info(device->channel, &debug_info); | 72 | hv_ringbuffer_get_debuginfo(&device->channel->inbound, &inbound); |
72 | 73 | hv_ringbuffer_get_debuginfo(&device->channel->outbound, &outbound); | |
73 | info->inbound.int_mask = debug_info.inbound.current_interrupt_mask; | 74 | |
74 | info->inbound.read_idx = debug_info.inbound.current_read_index; | 75 | info->inbound.int_mask = inbound.current_interrupt_mask; |
75 | info->inbound.write_idx = debug_info.inbound.current_write_index; | 76 | info->inbound.read_idx = inbound.current_read_index; |
76 | info->inbound.bytes_avail_toread = | 77 | info->inbound.write_idx = inbound.current_write_index; |
77 | debug_info.inbound.bytes_avail_toread; | 78 | info->inbound.bytes_avail_toread = inbound.bytes_avail_toread; |
78 | info->inbound.bytes_avail_towrite = | 79 | info->inbound.bytes_avail_towrite = inbound.bytes_avail_towrite; |
79 | debug_info.inbound.bytes_avail_towrite; | 80 | |
80 | 81 | info->outbound.int_mask = outbound.current_interrupt_mask; | |
81 | info->outbound.int_mask = | 82 | info->outbound.read_idx = outbound.current_read_index; |
82 | debug_info.outbound.current_interrupt_mask; | 83 | info->outbound.write_idx = outbound.current_write_index; |
83 | info->outbound.read_idx = debug_info.outbound.current_read_index; | 84 | info->outbound.bytes_avail_toread = outbound.bytes_avail_toread; |
84 | info->outbound.write_idx = debug_info.outbound.current_write_index; | 85 | info->outbound.bytes_avail_towrite = outbound.bytes_avail_towrite; |
85 | info->outbound.bytes_avail_toread = | ||
86 | debug_info.outbound.bytes_avail_toread; | ||
87 | info->outbound.bytes_avail_towrite = | ||
88 | debug_info.outbound.bytes_avail_towrite; | ||
89 | } | 86 | } |
90 | 87 | ||
91 | #define VMBUS_ALIAS_LEN ((sizeof((struct hv_vmbus_device_id *)0)->guid) * 2) | 88 | #define VMBUS_ALIAS_LEN ((sizeof((struct hv_vmbus_device_id *)0)->guid) * 2) |