Commit 15b2f647 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Greg Kroah-Hartman

staging: hv: Convert camel cased variables in connection.c to lower cases

Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a6238f21
...@@ -77,10 +77,10 @@ static void vmbus_setevent(struct vmbus_channel *channel) ...@@ -77,10 +77,10 @@ static void vmbus_setevent(struct vmbus_channel *channel)
if (channel->offermsg.monitor_allocated) { if (channel->offermsg.monitor_allocated) {
/* Each u32 represents 32 channels */ /* Each u32 represents 32 channels */
set_bit(channel->offermsg.child_relid & 31, set_bit(channel->offermsg.child_relid & 31,
(unsigned long *) gVmbusConnection.SendInterruptPage + (unsigned long *) vmbus_connection.SendInterruptPage +
(channel->offermsg.child_relid >> 5)); (channel->offermsg.child_relid >> 5));
monitorpage = gVmbusConnection.MonitorPages; monitorpage = vmbus_connection.MonitorPages;
monitorpage++; /* Get the child to parent monitor page */ monitorpage++; /* Get the child to parent monitor page */
set_bit(channel->monitor_bit, set_bit(channel->monitor_bit,
...@@ -100,11 +100,11 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel) ...@@ -100,11 +100,11 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
if (Channel->offermsg.monitor_allocated) { if (Channel->offermsg.monitor_allocated) {
/* Each u32 represents 32 channels */ /* Each u32 represents 32 channels */
clear_bit(Channel->offermsg.child_relid & 31, clear_bit(Channel->offermsg.child_relid & 31,
(unsigned long *)gVmbusConnection.SendInterruptPage + (unsigned long *)vmbus_connection.SendInterruptPage +
(Channel->offermsg.child_relid >> 5)); (Channel->offermsg.child_relid >> 5));
monitorPage = monitorPage =
(struct hv_monitor_page *)gVmbusConnection.MonitorPages; (struct hv_monitor_page *)vmbus_connection.MonitorPages;
monitorPage++; /* Get the child to parent monitor page */ monitorPage++; /* Get the child to parent monitor page */
clear_bit(Channel->monitor_bit, clear_bit(Channel->monitor_bit,
...@@ -133,7 +133,7 @@ void vmbus_get_debug_info(struct vmbus_channel *channel, ...@@ -133,7 +133,7 @@ void vmbus_get_debug_info(struct vmbus_channel *channel,
&channel->offermsg.offer.InterfaceInstance, &channel->offermsg.offer.InterfaceInstance,
sizeof(struct hv_guid)); sizeof(struct hv_guid));
monitorpage = (struct hv_monitor_page *)gVmbusConnection.MonitorPages; monitorpage = (struct hv_monitor_page *)vmbus_connection.MonitorPages;
debuginfo->monitorid = channel->offermsg.monitorid; debuginfo->monitorid = channel->offermsg.monitorid;
...@@ -265,10 +265,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, ...@@ -265,10 +265,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
if (userdatalen) if (userdatalen)
memcpy(openMsg->userdata, userdata, userdatalen); memcpy(openMsg->userdata, userdata, userdatalen);
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_add_tail(&openInfo->msglistentry, list_add_tail(&openInfo->msglistentry,
&gVmbusConnection.ChannelMsgList); &vmbus_connection.ChannelMsgList);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
DPRINT_DBG(VMBUS, "Sending channel open msg..."); DPRINT_DBG(VMBUS, "Sending channel open msg...");
...@@ -289,9 +289,9 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, ...@@ -289,9 +289,9 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
newchannel, openInfo->response.open_result.status); newchannel, openInfo->response.open_result.status);
Cleanup: Cleanup:
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&openInfo->msglistentry); list_del(&openInfo->msglistentry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
kfree(openInfo->waitevent); kfree(openInfo->waitevent);
kfree(openInfo); kfree(openInfo);
...@@ -501,8 +501,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer, ...@@ -501,8 +501,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
next_gpadl_handle = atomic_read(&gVmbusConnection.NextGpadlHandle); next_gpadl_handle = atomic_read(&vmbus_connection.NextGpadlHandle);
atomic_inc(&gVmbusConnection.NextGpadlHandle); atomic_inc(&vmbus_connection.NextGpadlHandle);
ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount); ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
if (ret) if (ret)
...@@ -521,11 +521,11 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer, ...@@ -521,11 +521,11 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
dump_gpadl_header(gpadlmsg); dump_gpadl_header(gpadlmsg);
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_add_tail(&msginfo->msglistentry, list_add_tail(&msginfo->msglistentry,
&gVmbusConnection.ChannelMsgList); &vmbus_connection.ChannelMsgList);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
DPRINT_DBG(VMBUS, "buffer %p, size %d msg cnt %d", DPRINT_DBG(VMBUS, "buffer %p, size %d msg cnt %d",
kbuffer, size, msgcount); kbuffer, size, msgcount);
...@@ -577,9 +577,9 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer, ...@@ -577,9 +577,9 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
*gpadl_handle = gpadlmsg->gpadl; *gpadl_handle = gpadlmsg->gpadl;
Cleanup: Cleanup:
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&msginfo->msglistentry); list_del(&msginfo->msglistentry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
kfree(msginfo->waitevent); kfree(msginfo->waitevent);
kfree(msginfo); kfree(msginfo);
...@@ -616,10 +616,10 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle) ...@@ -616,10 +616,10 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
msg->child_relid = channel->offermsg.child_relid; msg->child_relid = channel->offermsg.child_relid;
msg->gpadl = gpadl_handle; msg->gpadl = gpadl_handle;
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_add_tail(&info->msglistentry, list_add_tail(&info->msglistentry,
&gVmbusConnection.ChannelMsgList); &vmbus_connection.ChannelMsgList);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
ret = VmbusPostMessage(msg, ret = VmbusPostMessage(msg,
sizeof(struct vmbus_channel_gpadl_teardown)); sizeof(struct vmbus_channel_gpadl_teardown));
...@@ -631,9 +631,9 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle) ...@@ -631,9 +631,9 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
osd_waitevent_wait(info->waitevent); osd_waitevent_wait(info->waitevent);
/* Received a torndown response */ /* Received a torndown response */
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&info->msglistentry); list_del(&info->msglistentry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
kfree(info->waitevent); kfree(info->waitevent);
kfree(info); kfree(info);
...@@ -697,9 +697,9 @@ void vmbus_close(struct vmbus_channel *channel) ...@@ -697,9 +697,9 @@ void vmbus_close(struct vmbus_channel *channel)
*/ */
if (channel->state == CHANNEL_OPEN_STATE) { if (channel->state == CHANNEL_OPEN_STATE) {
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_del(&channel->listentry); list_del(&channel->listentry);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
free_channel(channel); free_channel(channel);
} }
......
...@@ -308,7 +308,7 @@ void free_channel(struct vmbus_channel *channel) ...@@ -308,7 +308,7 @@ void free_channel(struct vmbus_channel *channel)
* ie we can't destroy ourselves. * ie we can't destroy ourselves.
*/ */
INIT_WORK(&channel->work, release_channel); INIT_WORK(&channel->work, release_channel);
queue_work(gVmbusConnection.WorkQueue, &channel->work); queue_work(vmbus_connection.WorkQueue, &channel->work);
} }
...@@ -323,10 +323,10 @@ static void count_hv_channel(void) ...@@ -323,10 +323,10 @@ static void count_hv_channel(void)
static int counter; static int counter;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
if (++counter == MAX_MSG_TYPES) if (++counter == MAX_MSG_TYPES)
complete(&hv_channel_ready); complete(&hv_channel_ready);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
} }
/* /*
...@@ -361,9 +361,9 @@ static void vmbus_process_offer(struct work_struct *work) ...@@ -361,9 +361,9 @@ static void vmbus_process_offer(struct work_struct *work)
INIT_WORK(&newchannel->work, vmbus_process_rescind_offer); INIT_WORK(&newchannel->work, vmbus_process_rescind_offer);
/* Make sure this is a new offer */ /* Make sure this is a new offer */
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_for_each_entry(channel, &gVmbusConnection.ChannelList, listentry) { list_for_each_entry(channel, &vmbus_connection.ChannelList, listentry) {
if (!memcmp(&channel->offermsg.offer.InterfaceType, if (!memcmp(&channel->offermsg.offer.InterfaceType,
&newchannel->offermsg.offer.InterfaceType, &newchannel->offermsg.offer.InterfaceType,
sizeof(struct hv_guid)) && sizeof(struct hv_guid)) &&
...@@ -377,9 +377,9 @@ static void vmbus_process_offer(struct work_struct *work) ...@@ -377,9 +377,9 @@ static void vmbus_process_offer(struct work_struct *work)
if (fnew) if (fnew)
list_add_tail(&newchannel->listentry, list_add_tail(&newchannel->listentry,
&gVmbusConnection.ChannelList); &vmbus_connection.ChannelList);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
if (!fnew) { if (!fnew) {
DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)", DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)",
...@@ -412,9 +412,9 @@ static void vmbus_process_offer(struct work_struct *work) ...@@ -412,9 +412,9 @@ static void vmbus_process_offer(struct work_struct *work)
"unable to add child device object (relid %d)", "unable to add child device object (relid %d)",
newchannel->offermsg.child_relid); newchannel->offermsg.child_relid);
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_del(&newchannel->listentry); list_del(&newchannel->listentry);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
free_channel(newchannel); free_channel(newchannel);
} else { } else {
...@@ -577,9 +577,9 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr) ...@@ -577,9 +577,9 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr)
/* /*
* Find the open msg, copy the result and signal/unblock the wait event * Find the open msg, copy the result and signal/unblock the wait event
*/ */
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &gVmbusConnection.ChannelMsgList) { list_for_each(curr, &vmbus_connection.ChannelMsgList) {
/* FIXME: this should probably use list_entry() instead */ /* FIXME: this should probably use list_entry() instead */
msginfo = (struct vmbus_channel_msginfo *)curr; msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader = requestheader =
...@@ -598,7 +598,7 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr) ...@@ -598,7 +598,7 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr)
} }
} }
} }
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
} }
/* /*
...@@ -625,9 +625,9 @@ static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr) ...@@ -625,9 +625,9 @@ static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr)
* Find the establish msg, copy the result and signal/unblock the wait * Find the establish msg, copy the result and signal/unblock the wait
* event * event
*/ */
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &gVmbusConnection.ChannelMsgList) { list_for_each(curr, &vmbus_connection.ChannelMsgList) {
/* FIXME: this should probably use list_entry() instead */ /* FIXME: this should probably use list_entry() instead */
msginfo = (struct vmbus_channel_msginfo *)curr; msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader = requestheader =
...@@ -648,7 +648,7 @@ static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr) ...@@ -648,7 +648,7 @@ static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr)
} }
} }
} }
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
} }
/* /*
...@@ -673,9 +673,9 @@ static void vmbus_ongpadl_torndown( ...@@ -673,9 +673,9 @@ static void vmbus_ongpadl_torndown(
/* /*
* Find the open msg, copy the result and signal/unblock the wait event * Find the open msg, copy the result and signal/unblock the wait event
*/ */
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &gVmbusConnection.ChannelMsgList) { list_for_each(curr, &vmbus_connection.ChannelMsgList) {
/* FIXME: this should probably use list_entry() instead */ /* FIXME: this should probably use list_entry() instead */
msginfo = (struct vmbus_channel_msginfo *)curr; msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader = requestheader =
...@@ -694,7 +694,7 @@ static void vmbus_ongpadl_torndown( ...@@ -694,7 +694,7 @@ static void vmbus_ongpadl_torndown(
} }
} }
} }
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
} }
/* /*
...@@ -715,9 +715,9 @@ static void vmbus_onversion_response( ...@@ -715,9 +715,9 @@ static void vmbus_onversion_response(
unsigned long flags; unsigned long flags;
version_response = (struct vmbus_channel_version_response *)hdr; version_response = (struct vmbus_channel_version_response *)hdr;
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &gVmbusConnection.ChannelMsgList) { list_for_each(curr, &vmbus_connection.ChannelMsgList) {
/* FIXME: this should probably use list_entry() instead */ /* FIXME: this should probably use list_entry() instead */
msginfo = (struct vmbus_channel_msginfo *)curr; msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader = requestheader =
...@@ -733,7 +733,7 @@ static void vmbus_onversion_response( ...@@ -733,7 +733,7 @@ static void vmbus_onversion_response(
osd_waitevent_set(msginfo->waitevent); osd_waitevent_set(msginfo->waitevent);
} }
} }
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
} }
/* Channel message dispatch table */ /* Channel message dispatch table */
...@@ -857,9 +857,9 @@ void vmbus_release_unattached_channels(void) ...@@ -857,9 +857,9 @@ void vmbus_release_unattached_channels(void)
struct vmbus_channel *start = NULL; struct vmbus_channel *start = NULL;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_for_each_entry_safe(channel, pos, &gVmbusConnection.ChannelList, list_for_each_entry_safe(channel, pos, &vmbus_connection.ChannelList,
listentry) { listentry) {
if (channel == start) if (channel == start)
break; break;
...@@ -878,7 +878,7 @@ void vmbus_release_unattached_channels(void) ...@@ -878,7 +878,7 @@ void vmbus_release_unattached_channels(void)
} }
} }
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
} }
/* eof */ /* eof */
This diff is collapsed.
...@@ -239,7 +239,7 @@ static void vmbus_on_msg_dpc(struct hv_driver *drv) ...@@ -239,7 +239,7 @@ static void vmbus_on_msg_dpc(struct hv_driver *drv)
continue; continue;
INIT_WORK(&ctx->work, vmbus_onmessage_work); INIT_WORK(&ctx->work, vmbus_onmessage_work);
memcpy(&ctx->msg, msg, sizeof(*msg)); memcpy(&ctx->msg, msg, sizeof(*msg));
queue_work(gVmbusConnection.WorkQueue, &ctx->work); queue_work(vmbus_connection.WorkQueue, &ctx->work);
} }
msg->header.message_type = HVMSG_NONE; msg->header.message_type = HVMSG_NONE;
......
...@@ -98,7 +98,7 @@ struct VMBUS_MSGINFO { ...@@ -98,7 +98,7 @@ struct VMBUS_MSGINFO {
}; };
extern struct VMBUS_CONNECTION gVmbusConnection; extern struct VMBUS_CONNECTION vmbus_connection;
/* General vmbus interface */ /* General vmbus interface */
......
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