diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-13 11:32:55 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 09:01:16 -0700 |
commit | 8681db445ed407167cd0d78c48727773b132367b (patch) | |
tree | 70cb5d80249c0718e9bc789b2a9ffa0b68101e50 /drivers/hv/channel.c | |
parent | 7c55e1d0e64cf5acd8cf4a25927e2c7c322063aa (diff) | |
download | blackbird-op-linux-8681db445ed407167cd0d78c48727773b132367b.tar.gz blackbird-op-linux-8681db445ed407167cd0d78c48727773b132367b.zip |
hv: make "monitor_pages" a "real" pointer array
monitor_pages was a void pointer, containing an unknown number of arrays that
we just "knew" were a child and parent array of a specific size. Instead of
that implicit knowledge, let's make them a real pointer, allowing us to have
type safety, and a semblance of sane addressing schemes.
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/channel.c')
-rw-r--r-- | drivers/hv/channel.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index dde30b48c56c..04bf06560085 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -47,8 +47,8 @@ static void vmbus_setevent(struct vmbus_channel *channel) (unsigned long *) vmbus_connection.send_int_page + (channel->offermsg.child_relid >> 5)); - monitorpage = vmbus_connection.monitor_pages; - monitorpage++; /* Get the child to parent monitor page */ + /* Get the child to parent monitor page */ + monitorpage = vmbus_connection.monitor_pages[1]; sync_set_bit(channel->monitor_bit, (unsigned long *)&monitorpage->trigger_group @@ -69,8 +69,7 @@ void vmbus_get_debug_info(struct vmbus_channel *channel, u8 monitor_group = (u8)channel->offermsg.monitorid / 32; u8 monitor_offset = (u8)channel->offermsg.monitorid % 32; - monitorpage = (struct hv_monitor_page *)vmbus_connection.monitor_pages; - + monitorpage = vmbus_connection.monitor_pages[0]; debuginfo->servermonitor_pending = monitorpage->trigger_group[monitor_group].pending; debuginfo->servermonitor_latency = @@ -79,8 +78,7 @@ void vmbus_get_debug_info(struct vmbus_channel *channel, monitorpage->parameter[monitor_group] [monitor_offset].connectionid.u.id; - monitorpage++; - + monitorpage = vmbus_connection.monitor_pages[1]; debuginfo->clientmonitor_pending = monitorpage->trigger_group[monitor_group].pending; debuginfo->clientmonitor_latency = |