Re: [PATCH] virtio_net: convert to hw_features

2011-04-01 Thread David Miller
From: Michał Mirosław 
Date: Thu, 31 Mar 2011 13:01:35 +0200 (CEST)

> Signed-off-by: Michał Mirosław 

Applied.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Re: [PATCH RESEND] net: convert xen-netfront to hw_features

2011-04-01 Thread David Miller
From: Michał Mirosław 
Date: Thu, 31 Mar 2011 13:01:35 +0200 (CEST)

> Not tested in any way. The original code for offload setting seems broken
> as it resets the features on every netback reconnect.
> 
> This will set GSO_ROBUST at device creation time (earlier than connect time).
> 
> RX checksum offload is forced on - so advertise as it is.
> 
> Signed-off-by: Michał Mirosław 

Applied.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[PATCH 5/5] staging: hv: Convert camel case in in all functions to lower case in hv_mouse

2011-04-01 Thread Hank Janssen
Convert all camelcase variables inside of all remaining functions to lower 
case in hv_mouse.

Signed-off-by: Abhishek Kane 
Signed-off-by: Hank Janssen 
Signed-off-by: Haiyang Zhang 
Signed-off-by: K. Y. Srinivasan 

---
 drivers/staging/hv/hv_mouse.c |  225 +
 1 files changed, 113 insertions(+), 112 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 1edcdf7..23b69c1 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -202,23 +202,23 @@ static void reportdesc_callback(struct hv_device *dev, 
void *packet, u32 len);
 
 static struct mousevsc_dev *alloc_input_device(struct hv_device *device)
 {
-   struct mousevsc_dev *inputDevice;
+   struct mousevsc_dev *input_dev;
 
-   inputDevice = kzalloc(sizeof(struct mousevsc_dev), GFP_KERNEL);
+   input_dev = kzalloc(sizeof(struct mousevsc_dev), GFP_KERNEL);
 
-   if (!inputDevice)
+   if (!input_dev)
return NULL;
 
/*
 * Set to 2 to allow both inbound and outbound traffics
 * (ie get_input_device() and must_get_input_device()) to proceed.
 */
-   atomic_cmpxchg(&inputDevice->ref_count, 0, 2);
+   atomic_cmpxchg(&input_dev->ref_count, 0, 2);
 
-   inputDevice->device = device;
-   device->ext = inputDevice;
+   input_dev->device = device;
+   device->ext = input_dev;
 
-   return inputDevice;
+   return input_dev;
 }
 
 static void free_input_device(struct mousevsc_dev *device)
@@ -232,9 +232,9 @@ static void free_input_device(struct mousevsc_dev *device)
  */
 static struct mousevsc_dev *get_input_device(struct hv_device *device)
 {
-   struct mousevsc_dev *inputDevice;
+   struct mousevsc_dev *input_dev;
 
-   inputDevice = (struct mousevsc_dev *)device->ext;
+   input_dev = (struct mousevsc_dev *)device->ext;
 
 /*
  * FIXME
@@ -242,15 +242,15 @@ static struct mousevsc_dev *get_input_device(struct 
hv_device *device)
  * what the intention is...
  *
  * printk(KERN_ERR "-> REFCOUNT = %d",
- *inputDevice->ref_count);
+ *input_dev->ref_count);
  */
 
-   if (inputDevice && atomic_read(&inputDevice->ref_count) > 1)
-   atomic_inc(&inputDevice->ref_count);
+   if (input_dev && atomic_read(&input_dev->ref_count) > 1)
+   atomic_inc(&input_dev->ref_count);
else
-   inputDevice = NULL;
+   input_dev = NULL;
 
-   return inputDevice;
+   return input_dev;
 }
 
 /*
@@ -258,25 +258,25 @@ static struct mousevsc_dev *get_input_device(struct 
hv_device *device)
  */
 static struct mousevsc_dev *must_get_input_device(struct hv_device *device)
 {
-   struct mousevsc_dev *inputDevice;
+   struct mousevsc_dev *input_dev;
 
-   inputDevice = (struct mousevsc_dev *)device->ext;
+   input_dev = (struct mousevsc_dev *)device->ext;
 
-   if (inputDevice && atomic_read(&inputDevice->ref_count))
-   atomic_inc(&inputDevice->ref_count);
+   if (input_dev && atomic_read(&input_dev->ref_count))
+   atomic_inc(&input_dev->ref_count);
else
-   inputDevice = NULL;
+   input_dev = NULL;
 
-   return inputDevice;
+   return input_dev;
 }
 
 static void put_input_device(struct hv_device *device)
 {
-   struct mousevsc_dev *inputDevice;
+   struct mousevsc_dev *input_dev;
 
-   inputDevice = (struct mousevsc_dev *)device->ext;
+   input_dev = (struct mousevsc_dev *)device->ext;
 
-   atomic_dec(&inputDevice->ref_count);
+   atomic_dec(&input_dev->ref_count);
 }
 
 /*
@@ -284,15 +284,15 @@ static void put_input_device(struct hv_device *device)
  */
 static struct mousevsc_dev *release_input_device(struct hv_device *device)
 {
-   struct mousevsc_dev *inputDevice;
+   struct mousevsc_dev *input_dev;
 
-   inputDevice = (struct mousevsc_dev *)device->ext;
+   input_dev = (struct mousevsc_dev *)device->ext;
 
/* Busy wait until the ref drop to 2, then set it to 1  */
-   while (atomic_cmpxchg(&inputDevice->ref_count, 2, 1) != 2)
+   while (atomic_cmpxchg(&input_dev->ref_count, 2, 1) != 2)
udelay(100);
 
-   return inputDevice;
+   return input_dev;
 }
 
 /*
@@ -300,33 +300,33 @@ static struct mousevsc_dev *release_input_device(struct 
hv_device *device)
  */
 static struct mousevsc_dev *final_release_input_device(struct hv_device 
*device)
 {
-   struct mousevsc_dev *inputDevice;
+   struct mousevsc_dev *input_dev;
 
-   inputDevice = (struct mousevsc_dev *)device->ext;
+   input_dev = (struct mousevsc_dev *)device->ext;
 
/* Busy wait until the ref drop to 1, then set it to 0  */
-   while (atomic_cmpxchg(&inputDevice->ref_count, 1, 0) != 1)
+   while (atomic_cmpxchg(&input_dev->ref_count, 1, 0) != 1)
udelay(100);
 
dev

[PATCH 4/5] staging: hv: Convert camel case members of struct mousevsc_dev to lower case

2011-04-01 Thread Hank Janssen
Change camelcase members of struct mousevsc_dev to lower case in hv_mouse

Signed-off-by: Abhishek Kane 
Signed-off-by: Hank Janssen 
Signed-off-by: Haiyang Zhang 
Signed-off-by: K. Y. Srinivasan 

---
 drivers/staging/hv/hv_mouse.c |  127 +
 1 files changed, 65 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index ce88868..1edcdf7 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -167,23 +167,23 @@ struct  mousevsc_prt_msg {
  * Represents an mousevsc device
  */
 struct mousevsc_dev {
-   struct hv_device*Device;
+   struct hv_device*device;
/* 0 indicates the device is being destroyed */
-   atomic_tRefCount;
-   int NumOutstandingRequests;
-   unsigned char   bInitializeComplete;
-   struct mousevsc_prt_msg ProtocolReq;
-   struct mousevsc_prt_msg ProtocolResp;
+   atomic_tref_count;
+   int num_outstanding_req;
+   unsigned char   init_complete;
+   struct mousevsc_prt_msg protocol_req;
+   struct mousevsc_prt_msg protocol_resp;
/* Synchronize the request/response if needed */
-   wait_queue_head_t   ProtocolWaitEvent;
-   wait_queue_head_t   DeviceInfoWaitEvent;
+   wait_queue_head_t   protocol_wait_event;
+   wait_queue_head_t   dev_info_wait_event;
int protocol_wait_condition;
int device_wait_condition;
-   int DeviceInfoStatus;
+   int dev_info_status;
 
-   struct hid_descriptor   *HidDesc;
-   unsigned char   *ReportDesc;
-   u32 ReportDescSize;
+   struct hid_descriptor   *hid_desc;
+   unsigned char   *report_desc;
+   u32 report_desc_size;
struct hv_input_dev_info hid_dev_info;
 };
 
@@ -213,9 +213,9 @@ static struct mousevsc_dev *alloc_input_device(struct 
hv_device *device)
 * Set to 2 to allow both inbound and outbound traffics
 * (ie get_input_device() and must_get_input_device()) to proceed.
 */
-   atomic_cmpxchg(&inputDevice->RefCount, 0, 2);
+   atomic_cmpxchg(&inputDevice->ref_count, 0, 2);
 
-   inputDevice->Device = device;
+   inputDevice->device = device;
device->ext = inputDevice;
 
return inputDevice;
@@ -223,7 +223,7 @@ static struct mousevsc_dev *alloc_input_device(struct 
hv_device *device)
 
 static void free_input_device(struct mousevsc_dev *device)
 {
-   WARN_ON(atomic_read(&device->RefCount) == 0);
+   WARN_ON(atomic_read(&device->ref_count) == 0);
kfree(device);
 }
 
@@ -242,11 +242,11 @@ static struct mousevsc_dev *get_input_device(struct 
hv_device *device)
  * what the intention is...
  *
  * printk(KERN_ERR "-> REFCOUNT = %d",
- *inputDevice->RefCount);
+ *inputDevice->ref_count);
  */
 
-   if (inputDevice && atomic_read(&inputDevice->RefCount) > 1)
-   atomic_inc(&inputDevice->RefCount);
+   if (inputDevice && atomic_read(&inputDevice->ref_count) > 1)
+   atomic_inc(&inputDevice->ref_count);
else
inputDevice = NULL;
 
@@ -262,8 +262,8 @@ static struct mousevsc_dev *must_get_input_device(struct 
hv_device *device)
 
inputDevice = (struct mousevsc_dev *)device->ext;
 
-   if (inputDevice && atomic_read(&inputDevice->RefCount))
-   atomic_inc(&inputDevice->RefCount);
+   if (inputDevice && atomic_read(&inputDevice->ref_count))
+   atomic_inc(&inputDevice->ref_count);
else
inputDevice = NULL;
 
@@ -276,7 +276,7 @@ static void put_input_device(struct hv_device *device)
 
inputDevice = (struct mousevsc_dev *)device->ext;
 
-   atomic_dec(&inputDevice->RefCount);
+   atomic_dec(&inputDevice->ref_count);
 }
 
 /*
@@ -289,7 +289,7 @@ static struct mousevsc_dev *release_input_device(struct 
hv_device *device)
inputDevice = (struct mousevsc_dev *)device->ext;
 
/* Busy wait until the ref drop to 2, then set it to 1  */
-   while (atomic_cmpxchg(&inputDevice->RefCount, 2, 1) != 2)
+   while (atomic_cmpxchg(&inputDevice->ref_count, 2, 1) != 2)
udelay(100);
 
return inputDevice;
@@ -305,7 +305,7 @@ static struct mousevsc_dev 
*final_release_input_device(struct hv_device *device)
inputDevice = (struct mousevsc_dev *)device->ext;
 
/* Busy wait until the ref drop to 1, then set it to 0  */
-   while (atomic_cmpxchg(&inputDevice->RefCount, 1, 0) != 1)
+   while (atomic_cmpxchg(&inputDevice->ref_count, 1, 0) != 1)
udelay(100);
 
device->ext = NULL;
@@ -326,7 +326,7 @@ static void mousevsc_on_send_completion(struct 

[PATCH 2/5] staging: hv: Convert camel case func params to lower case in hv_mouse

2011-04-01 Thread Hank Janssen
Change all camelcase function params to lower case in hv_mouse

Signed-off-by: Abhishek Kane 
Signed-off-by: Hank Janssen 
Signed-off-by: Haiyang Zhang 
Signed-off-by: K. Y. Srinivasan 

---
 drivers/staging/hv/hv_mouse.c |  172 +
 1 files changed, 87 insertions(+), 85 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 084ba3b..3b0390d 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -200,7 +200,7 @@ static void deviceinfo_callback(struct hv_device *dev, 
struct hv_input_dev_info
 static void inputreport_callback(struct hv_device *dev, void *packet, u32 len);
 static void reportdesc_callback(struct hv_device *dev, void *packet, u32 len);
 
-static struct mousevsc_dev *alloc_input_device(struct hv_device *Device)
+static struct mousevsc_dev *alloc_input_device(struct hv_device *device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -215,26 +215,26 @@ static struct mousevsc_dev *alloc_input_device(struct 
hv_device *Device)
 */
atomic_cmpxchg(&inputDevice->RefCount, 0, 2);
 
-   inputDevice->Device = Device;
-   Device->ext = inputDevice;
+   inputDevice->Device = device;
+   device->ext = inputDevice;
 
return inputDevice;
 }
 
-static void free_input_device(struct mousevsc_dev *Device)
+static void free_input_device(struct mousevsc_dev *device)
 {
-   WARN_ON(atomic_read(&Device->RefCount) == 0);
-   kfree(Device);
+   WARN_ON(atomic_read(&device->RefCount) == 0);
+   kfree(device);
 }
 
 /*
  * Get the inputdevice object if exists and its refcount > 1
  */
-static struct mousevsc_dev *get_input_device(struct hv_device *Device)
+static struct mousevsc_dev *get_input_device(struct hv_device *device)
 {
struct mousevsc_dev *inputDevice;
 
-   inputDevice = (struct mousevsc_dev *)Device->ext;
+   inputDevice = (struct mousevsc_dev *)device->ext;
 
 /*
  * FIXME
@@ -256,11 +256,11 @@ static struct mousevsc_dev *get_input_device(struct 
hv_device *Device)
 /*
  * Get the inputdevice object iff exists and its refcount > 0
  */
-static struct mousevsc_dev *must_get_input_device(struct hv_device *Device)
+static struct mousevsc_dev *must_get_input_device(struct hv_device *device)
 {
struct mousevsc_dev *inputDevice;
 
-   inputDevice = (struct mousevsc_dev *)Device->ext;
+   inputDevice = (struct mousevsc_dev *)device->ext;
 
if (inputDevice && atomic_read(&inputDevice->RefCount))
atomic_inc(&inputDevice->RefCount);
@@ -270,11 +270,11 @@ static struct mousevsc_dev *must_get_input_device(struct 
hv_device *Device)
return inputDevice;
 }
 
-static void put_input_device(struct hv_device *Device)
+static void put_input_device(struct hv_device *device)
 {
struct mousevsc_dev *inputDevice;
 
-   inputDevice = (struct mousevsc_dev *)Device->ext;
+   inputDevice = (struct mousevsc_dev *)device->ext;
 
atomic_dec(&inputDevice->RefCount);
 }
@@ -282,11 +282,11 @@ static void put_input_device(struct hv_device *Device)
 /*
  * Drop ref count to 1 to effectively disable get_input_device()
  */
-static struct mousevsc_dev *release_input_device(struct hv_device *Device)
+static struct mousevsc_dev *release_input_device(struct hv_device *device)
 {
struct mousevsc_dev *inputDevice;
 
-   inputDevice = (struct mousevsc_dev *)Device->ext;
+   inputDevice = (struct mousevsc_dev *)device->ext;
 
/* Busy wait until the ref drop to 2, then set it to 1  */
while (atomic_cmpxchg(&inputDevice->RefCount, 2, 1) != 2)
@@ -296,82 +296,83 @@ static struct mousevsc_dev *release_input_device(struct 
hv_device *Device)
 }
 
 /*
- * Drop ref count to 0. No one can use InputDevice object.
+ * Drop ref count to 0. No one can use input_device object.
  */
-static struct mousevsc_dev *final_release_input_device(struct hv_device 
*Device)
+static struct mousevsc_dev *final_release_input_device(struct hv_device 
*device)
 {
struct mousevsc_dev *inputDevice;
 
-   inputDevice = (struct mousevsc_dev *)Device->ext;
+   inputDevice = (struct mousevsc_dev *)device->ext;
 
/* Busy wait until the ref drop to 1, then set it to 0  */
while (atomic_cmpxchg(&inputDevice->RefCount, 1, 0) != 1)
udelay(100);
 
-   Device->ext = NULL;
+   device->ext = NULL;
return inputDevice;
 }
 
-static void mousevsc_on_send_completion(struct hv_device *Device,
-   struct vmpacket_descriptor *Packet)
+static void mousevsc_on_send_completion(struct hv_device *device,
+   struct vmpacket_descriptor *packet)
 {
struct mousevsc_dev *inputDevice;
void *request;
 
-   inputDevice = must_get_input_device(Device);
+   inputDevice = must_get_input_device(device);
if (!inputDevice) {
pr_err("unable to get input devi

[PATCH 3/5] staging: hv: Convert camel case member of struct mousevsc_drv_obj to lower case

2011-04-01 Thread Hank Janssen
Change camelcase members of mousevsc_drv_obj to lower case in hv_mouse.

Signed-off-by: Abhishek Kane 
Signed-off-by: Hank Janssen 
Signed-off-by: Haiyang Zhang 
Signed-off-by: K. Y. Srinivasan 

---
 drivers/staging/hv/hv_mouse.c |   26 +-
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 3b0390d..ce88868 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -46,7 +46,7 @@ struct hv_input_dev_info {
 /* Represents the input vsc driver */
 /* FIXME - can be removed entirely */
 struct mousevsc_drv_obj {
-   struct hv_driver Base;
+   struct hv_driver base;
 };
 
 
@@ -836,7 +836,7 @@ static int mousevsc_probe(struct device *device)
dev_set_drvdata(device, input_dev_ctx);
 
/* Call to the vsc driver to add the device */
-   ret = mousevsc_drv_obj->Base.dev_add(device_obj, NULL);
+   ret = mousevsc_drv_obj->base.dev_add(device_obj, NULL);
 
if (ret != 0) {
DPRINT_ERR(INPUTVSC_DRV, "unable to add input vsc device");
@@ -868,14 +868,14 @@ static int mousevsc_remove(struct device *device)
input_dev_ctx->connected = 0;
}
 
-   if (!mousevsc_drv_obj->Base.dev_rm)
+   if (!mousevsc_drv_obj->base.dev_rm)
return -1;
 
/*
 * Call to the vsc driver to let it know that the device
 * is being removed
 */
-   ret = mousevsc_drv_obj->Base.dev_rm(device_obj);
+   ret = mousevsc_drv_obj->base.dev_rm(device_obj);
 
if (ret != 0) {
DPRINT_ERR(INPUTVSC_DRV,
@@ -951,7 +951,7 @@ static int mousevsc_drv_exit_cb(struct device *dev, void 
*data)
 static void mousevsc_drv_exit(void)
 {
struct mousevsc_drv_obj *mousevsc_drv_obj = &g_mousevsc_drv;
-   struct hv_driver *drv = &g_mousevsc_drv.Base;
+   struct hv_driver *drv = &g_mousevsc_drv.base;
int ret;
 
struct device *current_dev = NULL;
@@ -973,8 +973,8 @@ static void mousevsc_drv_exit(void)
device_unregister(current_dev);
}
 
-   if (mousevsc_drv_obj->Base.cleanup)
-   mousevsc_drv_obj->Base.cleanup(&mousevsc_drv_obj->Base);
+   if (mousevsc_drv_obj->base.cleanup)
+   mousevsc_drv_obj->base.cleanup(&mousevsc_drv_obj->base);
 
vmbus_child_driver_unregister(&drv->driver);
 
@@ -992,9 +992,9 @@ static int mouse_vsc_initialize(struct hv_driver *driver)
   sizeof(struct hv_guid));
 
/* Setup the dispatch table */
-   inputDriver->Base.dev_add = mousevsc_on_device_add;
-   inputDriver->Base.dev_rm = mousevsc_on_device_remove;
-   inputDriver->Base.cleanup = mousevsc_on_cleanup;
+   inputDriver->base.dev_add = mousevsc_on_device_add;
+   inputDriver->base.dev_rm = mousevsc_on_device_remove;
+   inputDriver->base.cleanup = mousevsc_on_cleanup;
 
return ret;
 }
@@ -1003,14 +1003,14 @@ static int mouse_vsc_initialize(struct hv_driver 
*driver)
 static int __init mousevsc_init(void)
 {
struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv;
-   struct hv_driver *drv = &g_mousevsc_drv.Base;
+   struct hv_driver *drv = &g_mousevsc_drv.base;
 
DPRINT_INFO(INPUTVSC_DRV, "Hyper-V Mouse driver initializing.");
 
/* Callback to client driver to complete the initialization */
-   mouse_vsc_initialize(&input_drv_obj->Base);
+   mouse_vsc_initialize(&input_drv_obj->base);
 
-   drv->driver.name = input_drv_obj->Base.name;
+   drv->driver.name = input_drv_obj->base.name;
drv->priv = input_drv_obj;
 
drv->driver.probe = mousevsc_probe;
-- 
1.7.1

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[PATCH 1/5] staging: hv: change camel case funct names to lower case funct in hv_mouse

2011-04-01 Thread Hank Janssen
Change all camelcase function names to lower case in hv_mouse

Signed-off-by: Abhishek Kane 
Signed-off-by: Hank Janssen 
Signed-off-by: Haiyang Zhang 
Signed-off-by: K. Y. Srinivasan 

---
 drivers/staging/hv/hv_mouse.c |   92 ++---
 1 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 50147f8..084ba3b 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -200,7 +200,7 @@ static void deviceinfo_callback(struct hv_device *dev, 
struct hv_input_dev_info
 static void inputreport_callback(struct hv_device *dev, void *packet, u32 len);
 static void reportdesc_callback(struct hv_device *dev, void *packet, u32 len);
 
-static struct mousevsc_dev *AllocInputDevice(struct hv_device *Device)
+static struct mousevsc_dev *alloc_input_device(struct hv_device *Device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -211,7 +211,7 @@ static struct mousevsc_dev *AllocInputDevice(struct 
hv_device *Device)
 
/*
 * Set to 2 to allow both inbound and outbound traffics
-* (ie GetInputDevice() and MustGetInputDevice()) to proceed.
+* (ie get_input_device() and must_get_input_device()) to proceed.
 */
atomic_cmpxchg(&inputDevice->RefCount, 0, 2);
 
@@ -221,7 +221,7 @@ static struct mousevsc_dev *AllocInputDevice(struct 
hv_device *Device)
return inputDevice;
 }
 
-static void FreeInputDevice(struct mousevsc_dev *Device)
+static void free_input_device(struct mousevsc_dev *Device)
 {
WARN_ON(atomic_read(&Device->RefCount) == 0);
kfree(Device);
@@ -230,7 +230,7 @@ static void FreeInputDevice(struct mousevsc_dev *Device)
 /*
  * Get the inputdevice object if exists and its refcount > 1
  */
-static struct mousevsc_dev *GetInputDevice(struct hv_device *Device)
+static struct mousevsc_dev *get_input_device(struct hv_device *Device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -256,7 +256,7 @@ static struct mousevsc_dev *GetInputDevice(struct hv_device 
*Device)
 /*
  * Get the inputdevice object iff exists and its refcount > 0
  */
-static struct mousevsc_dev *MustGetInputDevice(struct hv_device *Device)
+static struct mousevsc_dev *must_get_input_device(struct hv_device *Device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -270,7 +270,7 @@ static struct mousevsc_dev *MustGetInputDevice(struct 
hv_device *Device)
return inputDevice;
 }
 
-static void PutInputDevice(struct hv_device *Device)
+static void put_input_device(struct hv_device *Device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -280,9 +280,9 @@ static void PutInputDevice(struct hv_device *Device)
 }
 
 /*
- * Drop ref count to 1 to effectively disable GetInputDevice()
+ * Drop ref count to 1 to effectively disable get_input_device()
  */
-static struct mousevsc_dev *ReleaseInputDevice(struct hv_device *Device)
+static struct mousevsc_dev *release_input_device(struct hv_device *Device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -298,7 +298,7 @@ static struct mousevsc_dev *ReleaseInputDevice(struct 
hv_device *Device)
 /*
  * Drop ref count to 0. No one can use InputDevice object.
  */
-static struct mousevsc_dev *FinalReleaseInputDevice(struct hv_device *Device)
+static struct mousevsc_dev *final_release_input_device(struct hv_device 
*Device)
 {
struct mousevsc_dev *inputDevice;
 
@@ -312,12 +312,13 @@ static struct mousevsc_dev 
*FinalReleaseInputDevice(struct hv_device *Device)
return inputDevice;
 }
 
-static void MousevscOnSendCompletion(struct hv_device *Device, struct 
vmpacket_descriptor *Packet)
+static void mousevsc_on_send_completion(struct hv_device *Device,
+   struct vmpacket_descriptor *Packet)
 {
struct mousevsc_dev *inputDevice;
void *request;
 
-   inputDevice = MustGetInputDevice(Device);
+   inputDevice = must_get_input_device(Device);
if (!inputDevice) {
pr_err("unable to get input device...device being destroyed?");
return;
@@ -330,10 +331,11 @@ static void MousevscOnSendCompletion(struct hv_device 
*Device, struct vmpacket_d
/* Shouldn't we be doing something here? */
}
 
-   PutInputDevice(Device);
+   put_input_device(Device);
 }
 
-static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, 
struct synthhid_device_info *DeviceInfo)
+static void mousevsc_on_receive_device_info(struct mousevsc_dev *InputDevice,
+   struct synthhid_device_info *DeviceInfo)
 {
int ret = 0;
struct hid_descriptor *desc;
@@ -413,7 +415,8 @@ Cleanup:
wake_up(&InputDevice->DeviceInfoWaitEvent);
 }
 
-static void MousevscOnReceiveInputReport(struct mousevsc_dev *InputDevice, 
struct synthhid_input_report *InputReport)
+static void mousevsc_on_receive_input_report(struct mousevsc_dev *InputDevice,
+