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)
if (channel->offermsg.monitor_allocated) {
/* Each u32 represents 32 channels */
set_bit(channel->offermsg.child_relid & 31,
(unsigned long *) gVmbusConnection.SendInterruptPage +
(unsigned long *) vmbus_connection.SendInterruptPage +
(channel->offermsg.child_relid >> 5));
monitorpage = gVmbusConnection.MonitorPages;
monitorpage = vmbus_connection.MonitorPages;
monitorpage++; /* Get the child to parent monitor page */
set_bit(channel->monitor_bit,
......@@ -100,11 +100,11 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
if (Channel->offermsg.monitor_allocated) {
/* Each u32 represents 32 channels */
clear_bit(Channel->offermsg.child_relid & 31,
(unsigned long *)gVmbusConnection.SendInterruptPage +
(unsigned long *)vmbus_connection.SendInterruptPage +
(Channel->offermsg.child_relid >> 5));
monitorPage =
(struct hv_monitor_page *)gVmbusConnection.MonitorPages;
(struct hv_monitor_page *)vmbus_connection.MonitorPages;
monitorPage++; /* Get the child to parent monitor page */
clear_bit(Channel->monitor_bit,
......@@ -133,7 +133,7 @@ void vmbus_get_debug_info(struct vmbus_channel *channel,
&channel->offermsg.offer.InterfaceInstance,
sizeof(struct hv_guid));
monitorpage = (struct hv_monitor_page *)gVmbusConnection.MonitorPages;
monitorpage = (struct hv_monitor_page *)vmbus_connection.MonitorPages;
debuginfo->monitorid = channel->offermsg.monitorid;
......@@ -265,10 +265,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
if (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,
&gVmbusConnection.ChannelMsgList);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
&vmbus_connection.ChannelMsgList);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
DPRINT_DBG(VMBUS, "Sending channel open msg...");
......@@ -289,9 +289,9 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
newchannel, openInfo->response.open_result.status);
Cleanup:
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&openInfo->msglistentry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
kfree(openInfo->waitevent);
kfree(openInfo);
......@@ -501,8 +501,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
unsigned long flags;
int ret = 0;
next_gpadl_handle = atomic_read(&gVmbusConnection.NextGpadlHandle);
atomic_inc(&gVmbusConnection.NextGpadlHandle);
next_gpadl_handle = atomic_read(&vmbus_connection.NextGpadlHandle);
atomic_inc(&vmbus_connection.NextGpadlHandle);
ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
if (ret)
......@@ -521,11 +521,11 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
dump_gpadl_header(gpadlmsg);
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
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",
kbuffer, size, msgcount);
......@@ -577,9 +577,9 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
*gpadl_handle = gpadlmsg->gpadl;
Cleanup:
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&msginfo->msglistentry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
kfree(msginfo->waitevent);
kfree(msginfo);
......@@ -616,10 +616,10 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
msg->child_relid = channel->offermsg.child_relid;
msg->gpadl = gpadl_handle;
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_add_tail(&info->msglistentry,
&gVmbusConnection.ChannelMsgList);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
&vmbus_connection.ChannelMsgList);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
ret = VmbusPostMessage(msg,
sizeof(struct vmbus_channel_gpadl_teardown));
......@@ -631,9 +631,9 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
osd_waitevent_wait(info->waitevent);
/* Received a torndown response */
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&info->msglistentry);
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
kfree(info->waitevent);
kfree(info);
......@@ -697,9 +697,9 @@ void vmbus_close(struct vmbus_channel *channel)
*/
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);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
free_channel(channel);
}
......
......@@ -308,7 +308,7 @@ void free_channel(struct vmbus_channel *channel)
* ie we can't destroy ourselves.
*/
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)
static int counter;
unsigned long flags;
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
if (++counter == MAX_MSG_TYPES)
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)
INIT_WORK(&newchannel->work, vmbus_process_rescind_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,
&newchannel->offermsg.offer.InterfaceType,
sizeof(struct hv_guid)) &&
......@@ -377,9 +377,9 @@ static void vmbus_process_offer(struct work_struct *work)
if (fnew)
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) {
DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)",
......@@ -412,9 +412,9 @@ static void vmbus_process_offer(struct work_struct *work)
"unable to add child device object (relid %d)",
newchannel->offermsg.child_relid);
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_del(&newchannel->listentry);
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
free_channel(newchannel);
} else {
......@@ -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
*/
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 */
msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader =
......@@ -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)
* Find the establish 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 */
msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader =
......@@ -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(
/*
* 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 */
msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader =
......@@ -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(
unsigned long flags;
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 */
msginfo = (struct vmbus_channel_msginfo *)curr;
requestheader =
......@@ -733,7 +733,7 @@ static void vmbus_onversion_response(
osd_waitevent_set(msginfo->waitevent);
}
}
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
}
/* Channel message dispatch table */
......@@ -857,9 +857,9 @@ void vmbus_release_unattached_channels(void)
struct vmbus_channel *start = NULL;
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) {
if (channel == start)
break;
......@@ -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 */
This diff is collapsed.
......@@ -239,7 +239,7 @@ static void vmbus_on_msg_dpc(struct hv_driver *drv)
continue;
INIT_WORK(&ctx->work, vmbus_onmessage_work);
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;
......
......@@ -98,7 +98,7 @@ struct VMBUS_MSGINFO {
};
extern struct VMBUS_CONNECTION gVmbusConnection;
extern struct VMBUS_CONNECTION vmbus_connection;
/* 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