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

staging: hv: Rename camel cased functions in channel.c to lowercase

Rename camel cased functions in channel.c to lowercase
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 beb50909
This diff is collapsed.
......@@ -52,61 +52,61 @@ struct vmbus_channel_packet_multipage_buffer {
} __attribute__((packed));
extern int VmbusChannelOpen(struct vmbus_channel *channel,
u32 SendRingBufferSize,
u32 RecvRingBufferSize,
void *UserData,
u32 UserDataLen,
void(*OnChannelCallback)(void *context),
void *Context);
extern void VmbusChannelClose(struct vmbus_channel *channel);
extern int VmbusChannelSendPacket(struct vmbus_channel *channel,
const void *Buffer,
u32 BufferLen,
u64 RequestId,
enum vmbus_packet_type Type,
u32 Flags);
extern int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *channel,
struct hv_page_buffer PageBuffers[],
u32 PageCount,
void *Buffer,
u32 BufferLen,
u64 RequestId);
extern int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *channel,
extern int vmbus_open(struct vmbus_channel *channel,
u32 send_ringbuffersize,
u32 recv_ringbuffersize,
void *userdata,
u32 userdatalen,
void(*onchannel_callback)(void *context),
void *context);
extern void vmbus_close(struct vmbus_channel *channel);
extern int vmbus_sendpacket(struct vmbus_channel *channel,
const void *buffer,
u32 bufferLen,
u64 requestid,
enum vmbus_packet_type type,
u32 flags);
extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
struct hv_page_buffer pagebuffers[],
u32 pagecount,
void *buffer,
u32 bufferlen,
u64 requestid);
extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
struct hv_multipage_buffer *mpb,
void *Buffer,
u32 BufferLen,
u64 RequestId);
void *buffer,
u32 bufferlen,
u64 requestid);
extern int VmbusChannelEstablishGpadl(struct vmbus_channel *channel,
void *Kbuffer,
u32 Size,
u32 *GpadlHandle);
extern int vmbus_establish_gpadl(struct vmbus_channel *channel,
void *kbuffer,
u32 size,
u32 *gpadl_handle);
extern int VmbusChannelTeardownGpadl(struct vmbus_channel *channel,
u32 GpadlHandle);
extern int vmbus_teardown_gpadl(struct vmbus_channel *channel,
u32 gpadl_handle);
extern int VmbusChannelRecvPacket(struct vmbus_channel *channel,
void *Buffer,
u32 BufferLen,
u32 *BufferActualLen,
u64 *RequestId);
extern int vmbus_recvpacket(struct vmbus_channel *channel,
void *buffer,
u32 bufferlen,
u32 *buffer_actual_len,
u64 *requestid);
extern int VmbusChannelRecvPacketRaw(struct vmbus_channel *channel,
void *Buffer,
u32 BufferLen,
u32 *BufferActualLen,
u64 *RequestId);
extern int vmbus_recvpacket_raw(struct vmbus_channel *channel,
void *buffer,
u32 bufferlen,
u32 *buffer_actual_len,
u64 *requestid);
extern void VmbusChannelOnChannelEvent(struct vmbus_channel *channel);
extern void vmbus_onchannel_event(struct vmbus_channel *channel);
extern void VmbusChannelGetDebugInfo(struct vmbus_channel *channel,
extern void vmbus_get_debug_info(struct vmbus_channel *channel,
struct vmbus_channel_debug_info *debug);
extern void VmbusChannelOnTimer(unsigned long data);
extern void vmbus_ontimer(unsigned long data);
#endif /* _CHANNEL_H_ */
......@@ -31,21 +31,21 @@ static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize,
void (*ChannelCallback)(void *context),
void *Context)
{
return VmbusChannelOpen(device->context, SendBufferSize,
return vmbus_open(device->context, SendBufferSize,
RecvRingBufferSize, UserData, UserDataLen,
ChannelCallback, Context);
}
static void IVmbusChannelClose(struct hv_device *device)
{
VmbusChannelClose(device->context);
vmbus_close(device->context);
}
static int IVmbusChannelSendPacket(struct hv_device *device, const void *Buffer,
u32 BufferLen, u64 RequestId, u32 Type,
u32 Flags)
{
return VmbusChannelSendPacket(device->context, Buffer, BufferLen,
return vmbus_sendpacket(device->context, Buffer, BufferLen,
RequestId, Type, Flags);
}
......@@ -54,7 +54,7 @@ static int IVmbusChannelSendPacketPageBuffer(struct hv_device *device,
u32 PageCount, void *Buffer,
u32 BufferLen, u64 RequestId)
{
return VmbusChannelSendPacketPageBuffer(device->context, PageBuffers,
return vmbus_sendpacket_pagebuffer(device->context, PageBuffers,
PageCount, Buffer, BufferLen,
RequestId);
}
......@@ -63,7 +63,7 @@ static int IVmbusChannelSendPacketMultiPageBuffer(struct hv_device *device,
struct hv_multipage_buffer *MultiPageBuffer,
void *Buffer, u32 BufferLen, u64 RequestId)
{
return VmbusChannelSendPacketMultiPageBuffer(device->context,
return vmbus_sendpacket_multipagebuffer(device->context,
MultiPageBuffer, Buffer,
BufferLen, RequestId);
}
......@@ -72,7 +72,7 @@ static int IVmbusChannelRecvPacket(struct hv_device *device, void *Buffer,
u32 BufferLen, u32 *BufferActualLen,
u64 *RequestId)
{
return VmbusChannelRecvPacket(device->context, Buffer, BufferLen,
return vmbus_recvpacket(device->context, Buffer, BufferLen,
BufferActualLen, RequestId);
}
......@@ -80,20 +80,20 @@ static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *Buffer,
u32 BufferLen, u32 *BufferActualLen,
u64 *RequestId)
{
return VmbusChannelRecvPacketRaw(device->context, Buffer, BufferLen,
return vmbus_recvpacket_raw(device->context, Buffer, BufferLen,
BufferActualLen, RequestId);
}
static int IVmbusChannelEstablishGpadl(struct hv_device *device, void *Buffer,
u32 BufferLen, u32 *GpadlHandle)
{
return VmbusChannelEstablishGpadl(device->context, Buffer, BufferLen,
return vmbus_establish_gpadl(device->context, Buffer, BufferLen,
GpadlHandle);
}
static int IVmbusChannelTeardownGpadl(struct hv_device *device, u32 GpadlHandle)
{
return VmbusChannelTeardownGpadl(device->context, GpadlHandle);
return vmbus_teardown_gpadl(device->context, GpadlHandle);
}
......@@ -105,7 +105,7 @@ void GetChannelInfo(struct hv_device *device, struct hv_device_info *info)
if (!device->context)
return;
VmbusChannelGetDebugInfo(device->context, &debugInfo);
vmbus_get_debug_info(device->context, &debugInfo);
info->ChannelId = debugInfo.RelId;
info->ChannelState = debugInfo.State;
......
......@@ -172,7 +172,7 @@ void chn_cb_negotiate(void *context)
buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);
VmbusChannelRecvPacket(channel, buf, buflen, &recvlen, &requestid);
vmbus_recvpacket(channel, buf, buflen, &recvlen, &requestid);
if (recvlen > 0) {
icmsghdrp = (struct icmsg_hdr *)&buf[
......@@ -183,7 +183,7 @@ void chn_cb_negotiate(void *context)
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION
| ICMSGHDRFLAG_RESPONSE;
VmbusChannelSendPacket(channel, buf,
vmbus_sendpacket(channel, buf,
recvlen, requestid,
VmbusPacketTypeDataInBand, 0);
}
......@@ -249,7 +249,7 @@ struct vmbus_channel *AllocVmbusChannel(void)
init_timer(&channel->poll_timer);
channel->poll_timer.data = (unsigned long)channel;
channel->poll_timer.function = VmbusChannelOnTimer;
channel->poll_timer.function = vmbus_ontimer;
channel->ControlWQ = create_workqueue("hv_vmbus_ctl");
if (!channel->ControlWQ) {
......@@ -392,7 +392,7 @@ static void VmbusChannelProcessOffer(void *context)
if (memcmp(&newChannel->OfferMsg.Offer.InterfaceType,
&hv_cb_utils[cnt].data,
sizeof(struct hv_guid)) == 0 &&
VmbusChannelOpen(newChannel, 2 * PAGE_SIZE,
vmbus_open(newChannel, 2 * PAGE_SIZE,
2 * PAGE_SIZE, NULL, 0,
hv_cb_utils[cnt].callback,
newChannel) == 0) {
......
......@@ -254,10 +254,10 @@ static void VmbusProcessChannelEvent(void *context)
channel = GetChannelFromRelId(relId);
if (channel) {
VmbusChannelOnChannelEvent(channel);
vmbus_onchannel_event(channel);
/*
* WorkQueueQueueWorkItem(channel->dataWorkQueue,
* VmbusChannelOnChannelEvent,
* vmbus_onchannel_event,
* (void*)channel);
*/
} else {
......
......@@ -55,7 +55,7 @@ static void shutdown_onchannelcallback(void *context)
buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);
VmbusChannelRecvPacket(channel, buf, buflen, &recvlen, &requestid);
vmbus_recvpacket(channel, buf, buflen, &recvlen, &requestid);
if (recvlen > 0) {
DPRINT_DBG(VMBUS, "shutdown packet: len=%d, requestid=%lld",
......@@ -93,7 +93,7 @@ static void shutdown_onchannelcallback(void *context)
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION
| ICMSGHDRFLAG_RESPONSE;
VmbusChannelSendPacket(channel, buf,
vmbus_sendpacket(channel, buf,
recvlen, requestid,
VmbusPacketTypeDataInBand, 0);
}
......@@ -159,7 +159,7 @@ static void timesync_onchannelcallback(void *context)
buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);
VmbusChannelRecvPacket(channel, buf, buflen, &recvlen, &requestid);
vmbus_recvpacket(channel, buf, buflen, &recvlen, &requestid);
if (recvlen > 0) {
DPRINT_DBG(VMBUS, "timesync packet: recvlen=%d, requestid=%lld",
......@@ -180,7 +180,7 @@ static void timesync_onchannelcallback(void *context)
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION
| ICMSGHDRFLAG_RESPONSE;
VmbusChannelSendPacket(channel, buf,
vmbus_sendpacket(channel, buf,
recvlen, requestid,
VmbusPacketTypeDataInBand, 0);
}
......@@ -205,7 +205,7 @@ static void heartbeat_onchannelcallback(void *context)
buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);
VmbusChannelRecvPacket(channel, buf, buflen, &recvlen, &requestid);
vmbus_recvpacket(channel, buf, buflen, &recvlen, &requestid);
if (recvlen > 0) {
DPRINT_DBG(VMBUS, "heartbeat packet: len=%d, requestid=%lld",
......@@ -233,7 +233,7 @@ static void heartbeat_onchannelcallback(void *context)
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION
| ICMSGHDRFLAG_RESPONSE;
VmbusChannelSendPacket(channel, buf,
vmbus_sendpacket(channel, buf,
recvlen, requestid,
VmbusPacketTypeDataInBand, 0);
}
......
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