Haiyang Zhang
2010-Oct-15 17:14 UTC
[PATCH 1/5] staging: hv: Convert camel cased local variables in channel_interface.c to lower cases
From: Haiyang Zhang <haiyangz at microsoft.com> Convert camel cased local variables in channel_interface.c to lower cases Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel_interface.c | 126 ++++++++++++++++---------------- 1 files changed, 64 insertions(+), 62 deletions(-) diff --git a/drivers/staging/hv/channel_interface.c b/drivers/staging/hv/channel_interface.c index 4d35923..d9d345e 100644 --- a/drivers/staging/hv/channel_interface.c +++ b/drivers/staging/hv/channel_interface.c @@ -25,15 +25,15 @@ #include "osd.h" #include "vmbus_private.h" -static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize, - u32 RecvRingBufferSize, void *UserData, - u32 UserDataLen, - void (*ChannelCallback)(void *context), - void *Context) +static int IVmbusChannelOpen(struct hv_device *device, u32 sendbuffer_size, + u32 recv_ringbuffer_size, void *userdata, + u32 userdatalen, + void (*channel_callback)(void *context), + void *context) { - return vmbus_open(device->context, SendBufferSize, - RecvRingBufferSize, UserData, UserDataLen, - ChannelCallback, Context); + return vmbus_open(device->context, sendbuffer_size, + recv_ringbuffer_size, userdata, userdatalen, + channel_callback, context); } static void IVmbusChannelClose(struct hv_device *device) @@ -41,100 +41,102 @@ static void IVmbusChannelClose(struct hv_device *device) vmbus_close(device->context); } -static int IVmbusChannelSendPacket(struct hv_device *device, const void *Buffer, - u32 BufferLen, u64 RequestId, u32 Type, - u32 Flags) +static int IVmbusChannelSendPacket(struct hv_device *device, const void *buffer, + u32 bufferlen, u64 requestid, u32 type, + u32 flags) { - return vmbus_sendpacket(device->context, Buffer, BufferLen, - RequestId, Type, Flags); + return vmbus_sendpacket(device->context, buffer, bufferlen, + requestid, type, flags); } static int IVmbusChannelSendPacketPageBuffer(struct hv_device *device, - struct hv_page_buffer PageBuffers[], - u32 PageCount, void *Buffer, - u32 BufferLen, u64 RequestId) + struct hv_page_buffer pagebuffers[], + u32 pagecount, void *buffer, + u32 bufferlen, u64 requestid) { - return vmbus_sendpacket_pagebuffer(device->context, PageBuffers, - PageCount, Buffer, BufferLen, - RequestId); + return vmbus_sendpacket_pagebuffer(device->context, pagebuffers, + pagecount, buffer, bufferlen, + requestid); } static int IVmbusChannelSendPacketMultiPageBuffer(struct hv_device *device, - struct hv_multipage_buffer *MultiPageBuffer, - void *Buffer, u32 BufferLen, u64 RequestId) + struct hv_multipage_buffer *multi_pagebuffer, + void *buffer, u32 bufferlen, u64 requestid) { return vmbus_sendpacket_multipagebuffer(device->context, - MultiPageBuffer, Buffer, - BufferLen, RequestId); + multi_pagebuffer, buffer, + bufferlen, requestid); } -static int IVmbusChannelRecvPacket(struct hv_device *device, void *Buffer, - u32 BufferLen, u32 *BufferActualLen, - u64 *RequestId) +static int IVmbusChannelRecvPacket(struct hv_device *device, void *buffer, + u32 bufferlen, u32 *buffer_actuallen, + u64 *requestid) { - return vmbus_recvpacket(device->context, Buffer, BufferLen, - BufferActualLen, RequestId); + return vmbus_recvpacket(device->context, buffer, bufferlen, + buffer_actuallen, requestid); } -static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *Buffer, - u32 BufferLen, u32 *BufferActualLen, - u64 *RequestId) +static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *buffer, + u32 bufferlen, u32 *buffer_actuallen, + u64 *requestid) { - return vmbus_recvpacket_raw(device->context, Buffer, BufferLen, - BufferActualLen, RequestId); + return vmbus_recvpacket_raw(device->context, buffer, bufferlen, + buffer_actuallen, requestid); } -static int IVmbusChannelEstablishGpadl(struct hv_device *device, void *Buffer, - u32 BufferLen, u32 *GpadlHandle) +static int IVmbusChannelEstablishGpadl(struct hv_device *device, void *buffer, + u32 bufferlen, u32 *gpadl_handle) { - return vmbus_establish_gpadl(device->context, Buffer, BufferLen, - GpadlHandle); + return vmbus_establish_gpadl(device->context, buffer, bufferlen, + gpadl_handle); } -static int IVmbusChannelTeardownGpadl(struct hv_device *device, u32 GpadlHandle) +static int IVmbusChannelTeardownGpadl(struct hv_device *device, + u32 gpadl_handle) { - return vmbus_teardown_gpadl(device->context, GpadlHandle); + return vmbus_teardown_gpadl(device->context, gpadl_handle); } void GetChannelInfo(struct hv_device *device, struct hv_device_info *info) { - struct vmbus_channel_debug_info debugInfo; + struct vmbus_channel_debug_info debug_info; if (!device->context) return; - vmbus_get_debug_info(device->context, &debugInfo); + vmbus_get_debug_info(device->context, &debug_info); - info->ChannelId = debugInfo.RelId; - info->ChannelState = debugInfo.State; - memcpy(&info->ChannelType, &debugInfo.InterfaceType, + info->ChannelId = debug_info.RelId; + info->ChannelState = debug_info.State; + memcpy(&info->ChannelType, &debug_info.InterfaceType, sizeof(struct hv_guid)); - memcpy(&info->ChannelInstance, &debugInfo.InterfaceInstance, + memcpy(&info->ChannelInstance, &debug_info.InterfaceInstance, sizeof(struct hv_guid)); - info->MonitorId = debugInfo.MonitorId; + info->MonitorId = debug_info.MonitorId; - info->ServerMonitorPending = debugInfo.ServerMonitorPending; - info->ServerMonitorLatency = debugInfo.ServerMonitorLatency; - info->ServerMonitorConnectionId = debugInfo.ServerMonitorConnectionId; + info->ServerMonitorPending = debug_info.ServerMonitorPending; + info->ServerMonitorLatency = debug_info.ServerMonitorLatency; + info->ServerMonitorConnectionId = debug_info.ServerMonitorConnectionId; - info->ClientMonitorPending = debugInfo.ClientMonitorPending; - info->ClientMonitorLatency = debugInfo.ClientMonitorLatency; - info->ClientMonitorConnectionId = debugInfo.ClientMonitorConnectionId; + info->ClientMonitorPending = debug_info.ClientMonitorPending; + info->ClientMonitorLatency = debug_info.ClientMonitorLatency; + info->ClientMonitorConnectionId = debug_info.ClientMonitorConnectionId; - info->Inbound.InterruptMask = debugInfo.Inbound.CurrentInterruptMask; - info->Inbound.ReadIndex = debugInfo.Inbound.CurrentReadIndex; - info->Inbound.WriteIndex = debugInfo.Inbound.CurrentWriteIndex; - info->Inbound.BytesAvailToRead = debugInfo.Inbound.BytesAvailToRead; - info->Inbound.BytesAvailToWrite = debugInfo.Inbound.BytesAvailToWrite; + info->Inbound.InterruptMask = debug_info.Inbound.CurrentInterruptMask; + info->Inbound.ReadIndex = debug_info.Inbound.CurrentReadIndex; + info->Inbound.WriteIndex = debug_info.Inbound.CurrentWriteIndex; + info->Inbound.BytesAvailToRead = debug_info.Inbound.BytesAvailToRead; + info->Inbound.BytesAvailToWrite = debug_info.Inbound.BytesAvailToWrite; - info->Outbound.InterruptMask = debugInfo.Outbound.CurrentInterruptMask; - info->Outbound.ReadIndex = debugInfo.Outbound.CurrentReadIndex; - info->Outbound.WriteIndex = debugInfo.Outbound.CurrentWriteIndex; - info->Outbound.BytesAvailToRead = debugInfo.Outbound.BytesAvailToRead; - info->Outbound.BytesAvailToWrite = debugInfo.Outbound.BytesAvailToWrite; + info->Outbound.InterruptMask = debug_info.Outbound.CurrentInterruptMask; + info->Outbound.ReadIndex = debug_info.Outbound.CurrentReadIndex; + info->Outbound.WriteIndex = debug_info.Outbound.CurrentWriteIndex; + info->Outbound.BytesAvailToRead = debug_info.Outbound.BytesAvailToRead; + info->Outbound.BytesAvailToWrite + debug_info.Outbound.BytesAvailToWrite; } -- 1.6.3.2
Haiyang Zhang
2010-Oct-15 17:14 UTC
[PATCH 2/5] staging: hv: Convert camel cased function names in channel_interface.c to lower cases
From: Haiyang Zhang <haiyangz at microsoft.com> Convert camel cased function names in channel_interface.c to lower cases Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel_interface.c | 40 ++++++++++++++++---------------- drivers/staging/hv/channel_interface.h | 2 +- drivers/staging/hv/vmbus.c | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/hv/channel_interface.c b/drivers/staging/hv/channel_interface.c index d9d345e..abd7f7f 100644 --- a/drivers/staging/hv/channel_interface.c +++ b/drivers/staging/hv/channel_interface.c @@ -25,7 +25,7 @@ #include "osd.h" #include "vmbus_private.h" -static int IVmbusChannelOpen(struct hv_device *device, u32 sendbuffer_size, +static int ivmbus_open(struct hv_device *device, u32 sendbuffer_size, u32 recv_ringbuffer_size, void *userdata, u32 userdatalen, void (*channel_callback)(void *context), @@ -36,12 +36,12 @@ static int IVmbusChannelOpen(struct hv_device *device, u32 sendbuffer_size, channel_callback, context); } -static void IVmbusChannelClose(struct hv_device *device) +static void ivmbus_close(struct hv_device *device) { vmbus_close(device->context); } -static int IVmbusChannelSendPacket(struct hv_device *device, const void *buffer, +static int ivmbus_sendpacket(struct hv_device *device, const void *buffer, u32 bufferlen, u64 requestid, u32 type, u32 flags) { @@ -49,7 +49,7 @@ static int IVmbusChannelSendPacket(struct hv_device *device, const void *buffer, requestid, type, flags); } -static int IVmbusChannelSendPacketPageBuffer(struct hv_device *device, +static int ivmbus_sendpacket_pagebuffer(struct hv_device *device, struct hv_page_buffer pagebuffers[], u32 pagecount, void *buffer, u32 bufferlen, u64 requestid) @@ -59,7 +59,7 @@ static int IVmbusChannelSendPacketPageBuffer(struct hv_device *device, requestid); } -static int IVmbusChannelSendPacketMultiPageBuffer(struct hv_device *device, +static int ivmbus_sendpacket_multipagebuffer(struct hv_device *device, struct hv_multipage_buffer *multi_pagebuffer, void *buffer, u32 bufferlen, u64 requestid) { @@ -68,7 +68,7 @@ static int IVmbusChannelSendPacketMultiPageBuffer(struct hv_device *device, bufferlen, requestid); } -static int IVmbusChannelRecvPacket(struct hv_device *device, void *buffer, +static int ivmbus_recvpacket(struct hv_device *device, void *buffer, u32 bufferlen, u32 *buffer_actuallen, u64 *requestid) { @@ -76,7 +76,7 @@ static int IVmbusChannelRecvPacket(struct hv_device *device, void *buffer, buffer_actuallen, requestid); } -static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *buffer, +static int ivmbus_recvpacket_raw(struct hv_device *device, void *buffer, u32 bufferlen, u32 *buffer_actuallen, u64 *requestid) { @@ -84,14 +84,14 @@ static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *buffer, buffer_actuallen, requestid); } -static int IVmbusChannelEstablishGpadl(struct hv_device *device, void *buffer, +static int ivmbus_establish_gpadl(struct hv_device *device, void *buffer, u32 bufferlen, u32 *gpadl_handle) { return vmbus_establish_gpadl(device->context, buffer, bufferlen, gpadl_handle); } -static int IVmbusChannelTeardownGpadl(struct hv_device *device, +static int ivmbus_teardown_gpadl(struct hv_device *device, u32 gpadl_handle) { return vmbus_teardown_gpadl(device->context, gpadl_handle); @@ -99,7 +99,7 @@ static int IVmbusChannelTeardownGpadl(struct hv_device *device, } -void GetChannelInfo(struct hv_device *device, struct hv_device_info *info) +void get_channel_info(struct hv_device *device, struct hv_device_info *info) { struct vmbus_channel_debug_info debug_info; @@ -142,14 +142,14 @@ void GetChannelInfo(struct hv_device *device, struct hv_device_info *info) /* vmbus interface function pointer table */ const struct vmbus_channel_interface vmbus_ops = { - .Open = IVmbusChannelOpen, - .Close = IVmbusChannelClose, - .SendPacket = IVmbusChannelSendPacket, - .SendPacketPageBuffer = IVmbusChannelSendPacketPageBuffer, - .SendPacketMultiPageBuffer = IVmbusChannelSendPacketMultiPageBuffer, - .RecvPacket = IVmbusChannelRecvPacket, - .RecvPacketRaw = IVmbusChannelRecvPacketRaw, - .EstablishGpadl = IVmbusChannelEstablishGpadl, - .TeardownGpadl = IVmbusChannelTeardownGpadl, - .GetInfo = GetChannelInfo, + .Open = ivmbus_open, + .Close = ivmbus_close, + .SendPacket = ivmbus_sendpacket, + .SendPacketPageBuffer = ivmbus_sendpacket_pagebuffer, + .SendPacketMultiPageBuffer = ivmbus_sendpacket_multipagebuffer, + .RecvPacket = ivmbus_recvpacket, + .RecvPacketRaw = ivmbus_recvpacket_raw, + .EstablishGpadl = ivmbus_establish_gpadl, + .TeardownGpadl = ivmbus_teardown_gpadl, + .GetInfo = get_channel_info, }; diff --git a/drivers/staging/hv/channel_interface.h b/drivers/staging/hv/channel_interface.h index ec88219..1007612 100644 --- a/drivers/staging/hv/channel_interface.h +++ b/drivers/staging/hv/channel_interface.h @@ -27,7 +27,7 @@ #include "vmbus_api.h" -void GetChannelInfo(struct hv_device *Device, +void get_channel_info(struct hv_device *Device, struct hv_device_info *DeviceInfo); #endif /* _CHANNEL_INTERFACE_H_ */ diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c index ea2698c..0f2e1be 100644 --- a/drivers/staging/hv/vmbus.c +++ b/drivers/staging/hv/vmbus.c @@ -66,7 +66,7 @@ static void VmbusGetChannelOffers(void) static void VmbusGetChannelInfo(struct hv_device *DeviceObject, struct hv_device_info *DeviceInfo) { - GetChannelInfo(DeviceObject, DeviceInfo); + get_channel_info(DeviceObject, DeviceInfo); } /* -- 1.6.3.2
Haiyang Zhang
2010-Oct-15 17:14 UTC
[PATCH 3/5] staging: hv: Convert camel cased parameter in channel_interface.h to lower case
From: Haiyang Zhang <haiyangz at microsoft.com> Convert camel cased parameter in channel_interface.h to lower case Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel_interface.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/hv/channel_interface.h b/drivers/staging/hv/channel_interface.h index 1007612..82cff3d 100644 --- a/drivers/staging/hv/channel_interface.h +++ b/drivers/staging/hv/channel_interface.h @@ -27,7 +27,7 @@ #include "vmbus_api.h" -void get_channel_info(struct hv_device *Device, - struct hv_device_info *DeviceInfo); +void get_channel_info(struct hv_device *device, + struct hv_device_info *info); #endif /* _CHANNEL_INTERFACE_H_ */ -- 1.6.3.2