Staging: hv: cleanup coding style issues in ChannelMgmt.h
Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -129,7 +129,7 @@ Description:
|
|||||||
Allocate and initialize a vmbus channel object
|
Allocate and initialize a vmbus channel object
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
static VMBUS_CHANNEL* AllocVmbusChannel(void)
|
VMBUS_CHANNEL* AllocVmbusChannel(void)
|
||||||
{
|
{
|
||||||
VMBUS_CHANNEL* channel;
|
VMBUS_CHANNEL* channel;
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ Description:
|
|||||||
Release the resources used by the vmbus channel object
|
Release the resources used by the vmbus channel object
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
static void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
|
void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
|
||||||
{
|
{
|
||||||
del_timer(&Channel->poll_timer);
|
del_timer(&Channel->poll_timer);
|
||||||
|
|
||||||
@@ -665,10 +665,7 @@ Description:
|
|||||||
This is invoked in the vmbus worker thread context.
|
This is invoked in the vmbus worker thread context.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
static void
|
void VmbusOnChannelMessage(void *Context)
|
||||||
VmbusOnChannelMessage(
|
|
||||||
void *Context
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
HV_MESSAGE *msg=(HV_MESSAGE*)Context;
|
HV_MESSAGE *msg=(HV_MESSAGE*)Context;
|
||||||
VMBUS_CHANNEL_MESSAGE_HEADER* hdr;
|
VMBUS_CHANNEL_MESSAGE_HEADER* hdr;
|
||||||
@@ -714,10 +711,7 @@ Description:
|
|||||||
Send a request to get all our pending offers.
|
Send a request to get all our pending offers.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
static int
|
int VmbusChannelRequestOffers(void)
|
||||||
VmbusChannelRequestOffers(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
int ret=0;
|
int ret=0;
|
||||||
VMBUS_CHANNEL_MESSAGE_HEADER* msg;
|
VMBUS_CHANNEL_MESSAGE_HEADER* msg;
|
||||||
@@ -776,10 +770,7 @@ Description:
|
|||||||
Release channels that are unattached/unconnected ie (no drivers associated)
|
Release channels that are unattached/unconnected ie (no drivers associated)
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
static void
|
void VmbusChannelReleaseUnattachedChannels(void)
|
||||||
VmbusChannelReleaseUnattachedChannels(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
LIST_ENTRY *entry;
|
LIST_ENTRY *entry;
|
||||||
VMBUS_CHANNEL *channel;
|
VMBUS_CHANNEL *channel;
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef void (*PFN_CHANNEL_CALLBACK)(void * context);
|
typedef void (*PFN_CHANNEL_CALLBACK)(void *context);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CHANNEL_OFFER_STATE,
|
CHANNEL_OFFER_STATE,
|
||||||
@@ -52,14 +52,17 @@ typedef struct _VMBUS_CHANNEL {
|
|||||||
VMBUS_CHANNEL_STATE State;
|
VMBUS_CHANNEL_STATE State;
|
||||||
|
|
||||||
VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg;
|
VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg;
|
||||||
/* These are based on the OfferMsg.MonitorId. Save it here for easy access. */
|
/*
|
||||||
|
* These are based on the OfferMsg.MonitorId.
|
||||||
|
* Save it here for easy access.
|
||||||
|
*/
|
||||||
u8 MonitorGroup;
|
u8 MonitorGroup;
|
||||||
u8 MonitorBit;
|
u8 MonitorBit;
|
||||||
|
|
||||||
u32 RingBufferGpadlHandle;
|
u32 RingBufferGpadlHandle;
|
||||||
|
|
||||||
/* Allocated memory for ring buffer */
|
/* Allocated memory for ring buffer */
|
||||||
void * RingBufferPages;
|
void *RingBufferPages;
|
||||||
u32 RingBufferPageCount;
|
u32 RingBufferPageCount;
|
||||||
RING_BUFFER_INFO Outbound; /* send to parent */
|
RING_BUFFER_INFO Outbound; /* send to parent */
|
||||||
RING_BUFFER_INFO Inbound; /* receive from parent */
|
RING_BUFFER_INFO Inbound; /* receive from parent */
|
||||||
@@ -70,8 +73,7 @@ typedef struct _VMBUS_CHANNEL {
|
|||||||
/* HANDLE dataWorkQueue; */
|
/* HANDLE dataWorkQueue; */
|
||||||
|
|
||||||
PFN_CHANNEL_CALLBACK OnChannelCallback;
|
PFN_CHANNEL_CALLBACK OnChannelCallback;
|
||||||
void * ChannelCallbackContext;
|
void *ChannelCallbackContext;
|
||||||
|
|
||||||
} VMBUS_CHANNEL;
|
} VMBUS_CHANNEL;
|
||||||
|
|
||||||
|
|
||||||
@@ -106,7 +108,6 @@ typedef union {
|
|||||||
* Represents each channel msg on the vmbus connection This is a
|
* Represents each channel msg on the vmbus connection This is a
|
||||||
* variable-size data structure depending on the msg type itself
|
* variable-size data structure depending on the msg type itself
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _VMBUS_CHANNEL_MSGINFO {
|
typedef struct _VMBUS_CHANNEL_MSGINFO {
|
||||||
/* Bookkeeping stuff */
|
/* Bookkeeping stuff */
|
||||||
LIST_ENTRY MsgListEntry;
|
LIST_ENTRY MsgListEntry;
|
||||||
@@ -120,37 +121,22 @@ typedef struct _VMBUS_CHANNEL_MSGINFO {
|
|||||||
VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
|
VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
|
||||||
|
|
||||||
u32 MessageSize;
|
u32 MessageSize;
|
||||||
/* The channel message that goes out on the "wire". */
|
/*
|
||||||
/* It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header */
|
* The channel message that goes out on the "wire".
|
||||||
|
* It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header
|
||||||
|
*/
|
||||||
unsigned char Msg[0];
|
unsigned char Msg[0];
|
||||||
} VMBUS_CHANNEL_MSGINFO;
|
} VMBUS_CHANNEL_MSGINFO;
|
||||||
|
|
||||||
|
|
||||||
/* Routines */
|
VMBUS_CHANNEL *AllocVmbusChannel(void);
|
||||||
|
|
||||||
static VMBUS_CHANNEL*
|
void FreeVmbusChannel(VMBUS_CHANNEL *Channel);
|
||||||
AllocVmbusChannel(
|
|
||||||
void
|
|
||||||
);
|
|
||||||
|
|
||||||
static void
|
void VmbusOnChannelMessage(void *Context);
|
||||||
FreeVmbusChannel(
|
|
||||||
VMBUS_CHANNEL *Channel
|
|
||||||
);
|
|
||||||
|
|
||||||
static void
|
int VmbusChannelRequestOffers(void);
|
||||||
VmbusOnChannelMessage(
|
|
||||||
void *Context
|
|
||||||
);
|
|
||||||
|
|
||||||
static int
|
void VmbusChannelReleaseUnattachedChannels(void);
|
||||||
VmbusChannelRequestOffers(
|
|
||||||
void
|
|
||||||
);
|
|
||||||
|
|
||||||
static void
|
|
||||||
VmbusChannelReleaseUnattachedChannels(
|
|
||||||
void
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif /* _CHANNEL_MGMT_H_ */
|
#endif /* _CHANNEL_MGMT_H_ */
|
||||||
|
Reference in New Issue
Block a user