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