All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted)
@ 2010-02-17 20:58 Haiyang Zhang
  2010-02-17 21:05 ` Greg KH
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Haiyang Zhang @ 2010-02-17 20:58 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org', devel
  Cc: Hank Janssen, Haiyang Zhang, 'gregkh@suse.de'

From: Haiyang Zhang <haiyangz@microsoft.com>

Rename struct device_context and re-arrange the fields inside.
Rename struct device_context to struct vm_device, and move 
struct device field to the end according to Document/driver-model standard.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

---
 drivers/staging/hv/blkvsc_drv.c  |    8 ++++----
 drivers/staging/hv/netvsc_drv.c  |   10 +++++-----
 drivers/staging/hv/storvsc_drv.c |   14 +++++++-------
 drivers/staging/hv/vmbus.h       |   12 ++++++------
 drivers/staging/hv/vmbus_drv.c   |   36 ++++++++++++++++++------------------
 5 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 62b2828..764b13e 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -92,7 +92,7 @@ struct blkvsc_request {
 /* Per device structure */
 struct block_device_context {
 	/* point back to our device context */
-	struct device_context *device_ctx;
+	struct vm_device *device_ctx;
 	struct kmem_cache *request_pool;
 	spinlock_t lock;
 	struct gendisk *gd;
@@ -254,7 +254,7 @@ static int blkvsc_probe(struct device *device)
 				(struct blkvsc_driver_context *)driver_ctx;
 	struct storvsc_driver_object *storvsc_drv_obj =
 				&blkvsc_drv_ctx->drv_obj;
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
 
 	struct block_device_context *blkdev = NULL;
@@ -745,7 +745,7 @@ static int blkvsc_remove(struct device *device)
 				(struct blkvsc_driver_context *)driver_ctx;
 	struct storvsc_driver_object *storvsc_drv_obj =
 				&blkvsc_drv_ctx->drv_obj;
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
 	struct block_device_context *blkdev = dev_get_drvdata(device);
 	unsigned long flags;
@@ -865,7 +865,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
 			void (*request_completion)(struct hv_storvsc_request *))
 {
 	struct block_device_context *blkdev = blkvsc_req->dev;
-	struct device_context *device_ctx = blkdev->device_ctx;
+	struct vm_device *device_ctx = blkdev->device_ctx;
 	struct driver_context *driver_ctx =
 			driver_to_driver_context(device_ctx->device.driver);
 	struct blkvsc_driver_context *blkvsc_drv_ctx =
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 0d7459e..f86376d 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -42,7 +42,7 @@ MODULE_LICENSE("GPL");
 
 struct net_device_context {
 	/* point back to our device context */
-	struct device_context *device_ctx;
+	struct vm_device *device_ctx;
 	struct net_device_stats stats;
 };
 
@@ -282,7 +282,7 @@ retry_send:
 static void netvsc_linkstatus_callback(struct hv_device *device_obj,
 				       unsigned int status)
 {
-	struct device_context *device_ctx = to_device_context(device_obj);
+	struct vm_device *device_ctx = to_vm_device(device_obj);
 	struct net_device *net = dev_get_drvdata(&device_ctx->device);
 
 	DPRINT_ENTER(NETVSC_DRV);
@@ -309,7 +309,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
 static int netvsc_recv_callback(struct hv_device *device_obj,
 				struct hv_netvsc_packet *packet)
 {
-	struct device_context *device_ctx = to_device_context(device_obj);
+	struct vm_device *device_ctx = to_vm_device(device_obj);
 	struct net_device *net = dev_get_drvdata(&device_ctx->device);
 	struct net_device_context *net_device_ctx;
 	struct sk_buff *skb;
@@ -401,7 +401,7 @@ static int netvsc_probe(struct device *device)
 	struct netvsc_driver_context *net_drv_ctx =
 		(struct netvsc_driver_context *)driver_ctx;
 	struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
 	struct net_device *net = NULL;
 	struct net_device_context *net_device_ctx;
@@ -473,7 +473,7 @@ static int netvsc_remove(struct device *device)
 	struct netvsc_driver_context *net_drv_ctx =
 		(struct netvsc_driver_context *)driver_ctx;
 	struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct net_device *net = dev_get_drvdata(&device_ctx->device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
 	int ret;
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index d49dc21..c5123bc 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -42,7 +42,7 @@ struct host_device_context {
 	struct work_struct host_rescan_work;
 
 	/* point back to our device context */
-	struct device_context *device_ctx;
+	struct vm_device *device_ctx;
 	struct kmem_cache *request_pool;
 	unsigned int port;
 	unsigned char path;
@@ -240,7 +240,7 @@ static int storvsc_probe(struct device *device)
 				(struct storvsc_driver_context *)driver_ctx;
 	struct storvsc_driver_object *storvsc_drv_obj =
 				&storvsc_drv_ctx->drv_obj;
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
 	struct Scsi_Host *host;
 	struct host_device_context *host_device_ctx;
@@ -339,7 +339,7 @@ static int storvsc_remove(struct device *device)
 			(struct storvsc_driver_context *)driver_ctx;
 	struct storvsc_driver_object *storvsc_drv_obj =
 			&storvsc_drv_ctx->drv_obj;
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
 	struct Scsi_Host *host = dev_get_drvdata(device);
 	struct host_device_context *host_device_ctx =
@@ -640,7 +640,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd,
 	int ret;
 	struct host_device_context *host_device_ctx =
 		(struct host_device_context *)scmnd->device->host->hostdata;
-	struct device_context *device_ctx = host_device_ctx->device_ctx;
+	struct vm_device *device_ctx = host_device_ctx->device_ctx;
 	struct driver_context *driver_ctx =
 		driver_to_driver_context(device_ctx->device.driver);
 	struct storvsc_driver_context *storvsc_drv_ctx =
@@ -879,7 +879,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
 	int ret;
 	struct host_device_context *host_device_ctx =
 		(struct host_device_context *)scmnd->device->host->hostdata;
-	struct device_context *device_ctx = host_device_ctx->device_ctx;
+	struct vm_device *device_ctx = host_device_ctx->device_ctx;
 	struct driver_context *driver_ctx =
 			driver_to_driver_context(device_ctx->device.driver);
 	struct storvsc_driver_context *storvsc_drv_ctx =
@@ -916,7 +916,7 @@ static void storvsc_host_rescan_callback(struct work_struct *work)
 {
 	struct hv_device *device_obj =
 	    &((struct host_device_context *)work)->device_ctx->device_obj;
-	struct device_context *device_ctx = to_device_context(device_obj);
+	struct vm_device *device_ctx = to_vm_device(device_obj);
 	struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device);
 	struct scsi_device *sdev;
 	struct host_device_context *host_device_ctx;
@@ -1083,7 +1083,7 @@ static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[],
 
 static void storvsc_host_rescan(struct hv_device *device_obj)
 {
-	struct device_context *device_ctx = to_device_context(device_obj);
+	struct vm_device *device_ctx = to_vm_device(device_obj);
 	struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device);
 	struct host_device_context *host_device_ctx;
 
diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h
index ae0a896..6404b84 100644
--- a/drivers/staging/hv/vmbus.h
+++ b/drivers/staging/hv/vmbus.h
@@ -43,23 +43,23 @@ struct driver_context {
 	void (*shutdown)(struct device *);
 };
 
-struct device_context {
+struct vm_device {
 	struct work_struct probe_failed_work_item;
 	struct hv_guid class_id;
 	struct hv_guid device_id;
 	int probe_error;
-	struct device device;
 	struct hv_device device_obj;
+	struct device device;
 };
 
-static inline struct device_context *to_device_context(struct hv_device *d)
+static inline struct vm_device *to_vm_device(struct hv_device *d)
 {
-	return container_of(d, struct device_context, device_obj);
+	return container_of(d, struct vm_device, device_obj);
 }
 
-static inline struct device_context *device_to_device_context(struct device *d)
+static inline struct vm_device *device_to_vm_device(struct device *d)
 {
-	return container_of(d, struct device_context, device);
+	return container_of(d, struct vm_device, device);
 }
 
 static inline struct driver_context *driver_to_driver_context(struct device_driver *d)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 894eecf..d752e52 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -47,7 +47,7 @@ struct vmbus_driver_context {
 	struct tasklet_struct event_dpc;
 
 	/* The bus root device */
-	struct device_context device_ctx;
+	struct vm_device device_ctx;
 };
 
 static int vmbus_match(struct device *device, struct device_driver *driver);
@@ -135,7 +135,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
 				      struct device_attribute *dev_attr,
 				      char *buf)
 {
-	struct device_context *device_ctx = device_to_device_context(dev);
+	struct vm_device *device_ctx = device_to_vm_device(dev);
 	struct hv_device_info device_info;
 
 	memset(&device_info, 0, sizeof(struct hv_device_info));
@@ -245,7 +245,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
 {
 	struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
 	struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
-	struct device_context *dev_ctx = &g_vmbus_drv.device_ctx;
+	struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx;
 	int ret;
 	unsigned int vector;
 
@@ -307,7 +307,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
 	DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector);
 
 	/* Call to bus driver to add the root device */
-	memset(dev_ctx, 0, sizeof(struct device_context));
+	memset(dev_ctx, 0, sizeof(struct vm_device));
 
 	ret = vmbus_drv_obj->Base.OnDeviceAdd(&dev_ctx->device_obj, &vector);
 	if (ret != 0) {
@@ -368,7 +368,7 @@ static void vmbus_bus_exit(void)
 	struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
 	struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
 
-	struct device_context *dev_ctx = &g_vmbus_drv.device_ctx;
+	struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx;
 
 	DPRINT_ENTER(VMBUS_DRV);
 
@@ -471,13 +471,13 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
 						   struct hv_guid *instance,
 						   void *context)
 {
-	struct device_context *child_device_ctx;
+	struct vm_device *child_device_ctx;
 	struct hv_device *child_device_obj;
 
 	DPRINT_ENTER(VMBUS_DRV);
 
 	/* Allocate the new child device */
-	child_device_ctx = kzalloc(sizeof(struct device_context), GFP_KERNEL);
+	child_device_ctx = kzalloc(sizeof(struct vm_device), GFP_KERNEL);
 	if (!child_device_ctx) {
 		DPRINT_ERR(VMBUS_DRV,
 			"unable to allocate device_context for child device");
@@ -526,10 +526,10 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
 				       struct hv_device *child_device_obj)
 {
 	int ret = 0;
-	struct device_context *root_device_ctx =
-				to_device_context(root_device_obj);
-	struct device_context *child_device_ctx =
-				to_device_context(child_device_obj);
+	struct vm_device *root_device_ctx =
+				to_vm_device(root_device_obj);
+	struct vm_device *child_device_ctx =
+				to_vm_device(child_device_obj);
 	static atomic_t device_num = ATOMIC_INIT(0);
 
 	DPRINT_ENTER(VMBUS_DRV);
@@ -572,7 +572,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
  */
 static void vmbus_child_device_unregister(struct hv_device *device_obj)
 {
-	struct device_context *device_ctx = to_device_context(device_obj);
+	struct vm_device *device_ctx = to_vm_device(device_obj);
 
 	DPRINT_ENTER(VMBUS_DRV);
 
@@ -610,7 +610,7 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
  */
 static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
 {
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 	int ret;
 
 	DPRINT_ENTER(VMBUS_DRV);
@@ -687,7 +687,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
 {
 	int match = 0;
 	struct driver_context *driver_ctx = driver_to_driver_context(driver);
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 
 	DPRINT_ENTER(VMBUS_DRV);
 
@@ -724,7 +724,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
  */
 static void vmbus_probe_failed_cb(struct work_struct *context)
 {
-	struct device_context *device_ctx = (struct device_context *)context;
+	struct vm_device *device_ctx = (struct vm_device *)context;
 
 	DPRINT_ENTER(VMBUS_DRV);
 
@@ -746,8 +746,8 @@ static int vmbus_probe(struct device *child_device)
 	int ret = 0;
 	struct driver_context *driver_ctx =
 			driver_to_driver_context(child_device->driver);
-	struct device_context *device_ctx =
-			device_to_device_context(child_device);
+	struct vm_device *device_ctx =
+			device_to_vm_device(child_device);
 
 	DPRINT_ENTER(VMBUS_DRV);
 
@@ -871,7 +871,7 @@ static void vmbus_bus_release(struct device *device)
  */
 static void vmbus_device_release(struct device *device)
 {
-	struct device_context *device_ctx = device_to_device_context(device);
+	struct vm_device *device_ctx = device_to_vm_device(device);
 
 	DPRINT_ENTER(VMBUS_DRV);
 
-- 
1.6.3.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted)
  2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
@ 2010-02-17 21:05 ` Greg KH
  2010-02-17 23:50 ` Greg KH
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2010-02-17 21:05 UTC (permalink / raw)
  To: Haiyang Zhang; +Cc: 'linux-kernel@vger.kernel.org', devel, Hank Janssen

On Wed, Feb 17, 2010 at 08:58:47PM +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> Rename struct device_context and re-arrange the fields inside.
> Rename struct device_context to struct vm_device, and move 
> struct device field to the end according to Document/driver-model standard.

There is no need to move the struct device to the end, it can be
anywhere in the structure, just don't put it at the beginning so you
think you can cast pointers like other parts of the hv code does.

Anyway, no big deal, I'll queue this up in a bit.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted)
  2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
  2010-02-17 21:05 ` Greg KH
@ 2010-02-17 23:50 ` Greg KH
  2010-02-17 23:52 ` Greg KH
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2010-02-17 23:50 UTC (permalink / raw)
  To: Haiyang Zhang
  Cc: 'linux-kernel@vger.kernel.org',
	devel, Hank Janssen, 'gregkh@suse.de'

On Wed, Feb 17, 2010 at 08:58:47PM +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> Rename struct device_context and re-arrange the fields inside.
> Rename struct device_context to struct vm_device, and move 
> struct device field to the end according to Document/driver-model standard.
> 
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

What tree did you make this against?  I'm getting conflicts in the
drivers/staging/hv/storvsc_drv.c file.  Let me go see if they are
trivial for me to fix up or not...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted)
  2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
  2010-02-17 21:05 ` Greg KH
  2010-02-17 23:50 ` Greg KH
@ 2010-02-17 23:52 ` Greg KH
  2010-02-18 15:51   ` Haiyang Zhang
  2010-03-03 16:42   ` Ringbuffer usage in Linux Hyper-V drivers Hank Janssen
  2010-03-04 17:46 ` [PATCH 1/1] Stage: hv: Remove Ringbuffer from TODO line Hank Janssen
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Greg KH @ 2010-02-17 23:52 UTC (permalink / raw)
  To: Haiyang Zhang
  Cc: 'linux-kernel@vger.kernel.org',
	devel, Hank Janssen, 'gregkh@suse.de'

On Wed, Feb 17, 2010 at 08:58:47PM +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> Rename struct device_context and re-arrange the fields inside.
> Rename struct device_context to struct vm_device, and move 
> struct device field to the end according to Document/driver-model standard.

Ok, I fixed the patch up, but it looks like you did not make this
against the linux-next tree, but against Linus's tree, right?  The code
has changed since Linus's tree a bit in places (dead code was removed),
and it conflicted with this patch.

Next time please be more careful.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted)
  2010-02-17 23:52 ` Greg KH
@ 2010-02-18 15:51   ` Haiyang Zhang
  2010-03-03 16:42   ` Ringbuffer usage in Linux Hyper-V drivers Hank Janssen
  1 sibling, 0 replies; 16+ messages in thread
From: Haiyang Zhang @ 2010-02-18 15:51 UTC (permalink / raw)
  To: Greg KH
  Cc: 'linux-kernel@vger.kernel.org',
	devel, Hank Janssen, 'gregkh@suse.de'

> 
> Ok, I fixed the patch up, but it looks like you did not make this
> against the linux-next tree, but against Linus's tree, right?  The code
> has changed since Linus's tree a bit in places (dead code was removed),
> and it conflicted with this patch.
> 
> Next time please be more careful.

Thanks for fixing the patch! 
And, I will ensure I use linux-next tree for future patches.

- Haiyang

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Ringbuffer usage in Linux Hyper-V drivers
  2010-02-17 23:52 ` Greg KH
  2010-02-18 15:51   ` Haiyang Zhang
@ 2010-03-03 16:42   ` Hank Janssen
  2010-03-03 17:49     ` Jeremy Fitzhardinge
  2010-03-03 23:39     ` Greg KH
  1 sibling, 2 replies; 16+ messages in thread
From: Hank Janssen @ 2010-03-03 16:42 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org', devel, virtualization
  Cc: Haiyang Zhang, Hashir Abdi



All,

I have been looking at one of the TODO items in the Linux Hyper-V drivers. 

Specifically the one that says;

	- remove RingBuffer.c to use in-kernel ringbuffer functions instead.

I spend some time figuring out the ring buffer capability inside of the Linux 
Kernel to see if we could change the Hyper-V ring buffer out for the in-kernel 
ring buffer capability.

The ring buffer in the Hyper-V Linux drivers is used to communicate with the 
parent partition running Server 2008 Hyper-V. The ring buffer functionality on 
the Hyper-V Linux drivers is written to be functionally compatible with" the 
ring buffer functionality on the Hyper-V Server. Consequently, it is not 
possible to make any changes that might break the compatibility with server 
side ring buffer implementation.  

There is a pretty good chance that ring buffer on Hyper-V will change to support 
additional functionality. I did further investigations to check on other 
virtualization technologies. And this same things seems to be true for XEN, 
they also implemented their own ring buffer implementation on the guest side 
because of their host side implementation.

So my question is to the community at large, am I missing something that would 
enable me to use an existing ring buffer functionality somehow in the kernel?  
If not, I want to remove the line from the TODO file that is requesting to use the 
in-kernel ring buffer functionality.

Finally, while checking this out, I looked at a bunch of non virtualization device 
drivers currently in the kernel. And all the ones I looked at have 
implemented their own ring buffer. Is there a reason why this might be the case?
 
As usual, any help is appreciated.

Thanks,

Hank Janssen.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Ringbuffer usage in Linux Hyper-V drivers
  2010-03-03 16:42   ` Ringbuffer usage in Linux Hyper-V drivers Hank Janssen
@ 2010-03-03 17:49     ` Jeremy Fitzhardinge
  2010-03-03 23:39     ` Greg KH
  1 sibling, 0 replies; 16+ messages in thread
From: Jeremy Fitzhardinge @ 2010-03-03 17:49 UTC (permalink / raw)
  To: Hank Janssen
  Cc: 'linux-kernel@vger.kernel.org',
	devel, virtualization, Haiyang Zhang, Hashir Abdi

On 03/03/2010 08:42 AM, Hank Janssen wrote:
> There is a pretty good chance that ring buffer on Hyper-V will change to support
> additional functionality. I did further investigations to check on other
> virtualization technologies. And this same things seems to be true for XEN,
> they also implemented their own ring buffer implementation on the guest side
> because of their host side implementation.
>    

Yes.  The cross-domain producer-consumer ringbuffer is a pretty specific 
protocol.  Not only is the data format an ABI, but the exact protocol 
for what pointers get updated when, etc.  Its not at all obvious how we 
could reuse the kernel ringbuffer implementation, since it assumes its 
implementing both the producer and consumer ends.

> So my question is to the community at large, am I missing something that would
> enable me to use an existing ring buffer functionality somehow in the kernel?
> If not, I want to remove the line from the TODO file that is requesting to use the
> in-kernel ring buffer functionality.
>
> Finally, while checking this out, I looked at a bunch of non virtualization device
> drivers currently in the kernel. And all the ones I looked at have
> implemented their own ring buffer. Is there a reason why this might be the case?
>    

linux/ring_buffer.h is relatively new, and probably post-dates most of 
the driver ringbuffers.  If the ringbuffer is entirely within the kernel 
(say, between an ISR and the rest of the kernel) then I guess it might 
be possible to use the standard functions.  But if half the ringbuffer 
is being managed by the device itself, then that will define the protocol.

     J

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Ringbuffer usage in Linux Hyper-V drivers
  2010-03-03 16:42   ` Ringbuffer usage in Linux Hyper-V drivers Hank Janssen
  2010-03-03 17:49     ` Jeremy Fitzhardinge
@ 2010-03-03 23:39     ` Greg KH
  1 sibling, 0 replies; 16+ messages in thread
From: Greg KH @ 2010-03-03 23:39 UTC (permalink / raw)
  To: Hank Janssen
  Cc: 'linux-kernel@vger.kernel.org',
	devel, virtualization, Haiyang Zhang, Hashir Abdi

On Wed, Mar 03, 2010 at 04:42:27PM +0000, Hank Janssen wrote:
> The ring buffer in the Hyper-V Linux drivers is used to communicate with the 
> parent partition running Server 2008 Hyper-V. The ring buffer functionality on 
> the Hyper-V Linux drivers is written to be functionally compatible with" the 
> ring buffer functionality on the Hyper-V Server. Consequently, it is not 
> possible to make any changes that might break the compatibility with server 
> side ring buffer implementation.  

Ok, that makes sense, feel free to remove that TODO item.

thanks for looking into this.

greg k-h

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/1] Stage: hv: Remove Ringbuffer from TODO line
  2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
                   ` (2 preceding siblings ...)
  2010-02-17 23:52 ` Greg KH
@ 2010-03-04 17:46 ` Hank Janssen
  2010-03-04 17:48 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format Hank Janssen
  2010-03-04 22:11   ` Hank Janssen
  5 siblings, 0 replies; 16+ messages in thread
From: Hank Janssen @ 2010-03-04 17:46 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org', devel, virtualization
  Cc: Haiyang Zhang, Hashir Abdi, Greg KH

From: Hank Janssen <hjanssen@microsoft.com>

Remove Ringbuffer work line item from TODO file. 

The ring buffer in the Hyper-V Linux drivers is used to communicate with 
the parent partition running Windows Server 2008 Hyper-V. The ring buffer functionality 
on the Hyper-V Linux drivers is written to be functionally compatible with 
the ring buffer functionality on the Hyper-V Server. Consequently, it is not 
possible to make any changes that might break the compatibility with server 
side ring buffer implementation.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

---
 drivers/staging/hv/TODO |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO index dbfbde9..efe8ce9 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -1,7 +1,6 @@
 TODO:
 	- fix remaining checkpatch warnings and errors
 	- use of /** when it is not a kerneldoc header
-	- remove RingBuffer.c to us in-kernel ringbuffer functions instead.
 	- audit the vmbus to verify it is working properly with the
 	  driver model
 	- convert vmbus driver interface function pointer tables

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format
  2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
                   ` (3 preceding siblings ...)
  2010-03-04 17:46 ` [PATCH 1/1] Stage: hv: Remove Ringbuffer from TODO line Hank Janssen
@ 2010-03-04 17:48 ` Hank Janssen
  2010-03-04 17:55   ` Joe Perches
  2010-03-04 18:03   ` Randy Dunlap
  2010-03-04 22:11   ` Hank Janssen
  5 siblings, 2 replies; 16+ messages in thread
From: Hank Janssen @ 2010-03-04 17:48 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org', devel, virtualization
  Cc: Haiyang Zhang, Hashir Abdi, Greg KH


From: Hank Janssen <hjanssen@microsoft.com>

Removed kerneldoc /** from functions that should not have them.
Added proper kerneldoc headers to functions that should have them.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

---
 drivers/staging/hv/Channel.c     |   49 ++++++++++++++-----------
 drivers/staging/hv/ChannelMgmt.c |   33 +++++++++--------
 drivers/staging/hv/Connection.c  |   14 ++++----
 drivers/staging/hv/Hv.c          |   18 +++++-----
 drivers/staging/hv/NetVsc.c      |    8 ++--
 drivers/staging/hv/StorVsc.c     |   10 +++---
 drivers/staging/hv/TODO          |    1 -
 drivers/staging/hv/Vmbus.c       |   26 +++++++-------
 drivers/staging/hv/VmbusApi.h    |   19 ++++++++++
 drivers/staging/hv/blkvsc_drv.c  |    6 ++--
 drivers/staging/hv/netvsc_drv.c  |    4 +-
 drivers/staging/hv/osd.c         |   70 +++++++++++++++++++++++++++++++++++
 drivers/staging/hv/storvsc_drv.c |   14 ++++----
 drivers/staging/hv/vmbus_drv.c   |   74 +++++++++++++++++++++++++------------
 14 files changed, 233 insertions(+), 113 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index d46eb14..1fc2710 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -64,8 +64,9 @@ static void DumpMonitorPage(struct hv_monitor_page *MonitorPage)  }  #endif

-/**
- * VmbusChannelSetEvent - Trigger an event notification on the specified channel.
+/*
+ * VmbusChannelSetEvent - Trigger an event notification on the
+specified
+ * channel.
  */
 static void VmbusChannelSetEvent(struct vmbus_channel *Channel)  { @@ -119,7 +120,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)  }

 #endif
-/**
+/*
  * VmbusChannelGetDebugInfo -Retrieve various channel debug info
  */
 void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel, @@ -164,7 +165,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
        RingBufferGetDebugInfo(&Channel->Outbound, &DebugInfo->Outbound);  }

-/**
+/*
  * VmbusChannelOpen - Open the specified channel.
  */
 int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize, @@ -282,8 +283,9 @@ Cleanup:
        return 0;
 }

-/**
- * DumpGpadlBody - Dump the gpadl body message to the console for debugging purposes.
+/*
+ * DumpGpadlBody - Dump the gpadl body message to the console for
+ * debugging purposes.
  */
 static void DumpGpadlBody(struct vmbus_channel_gpadl_body *Gpadl, u32 Len)  { @@ -299,8 +301,9 @@ static void DumpGpadlBody(struct vmbus_channel_gpadl_body *Gpadl, u32 Len)
                           i, Gpadl->Pfn[i]);
 }

-/**
- * DumpGpadlHeader - Dump the gpadl header message to the console for debugging purposes.
+/*
+ * DumpGpadlHeader - Dump the gpadl header message to the console for
+ * debugging purposes.
  */
 static void DumpGpadlHeader(struct vmbus_channel_gpadl_header *Gpadl)  { @@ -324,7 +327,7 @@ static void DumpGpadlHeader(struct vmbus_channel_gpadl_header *Gpadl)
        }
 }

-/**
+/*
  * VmbusChannelCreateGpadlHeader - Creates a gpadl for the specified buffer
  */
 static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size, @@ -440,7 +443,7 @@ static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
        return 0;
 }

-/**
+/*
  * VmbusChannelEstablishGpadl - Estabish a GPADL for the specified buffer
  *
  * @Channel: a channel
@@ -544,7 +547,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * VmbusChannelTeardownGpadl -Teardown the specified GPADL handle
  */
 int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle) @@ -597,7 +600,7 @@ int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
        return ret;
 }

-/**
+/*
  * VmbusChannelClose - Close the specified channel
  */
 void VmbusChannelClose(struct vmbus_channel *Channel) @@ -662,7 +665,7 @@ void VmbusChannelClose(struct vmbus_channel *Channel)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelSendPacket - Send the specified buffer on the given channel
  */
 int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer, @@ -708,8 +711,9 @@ int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer,
        return ret;
 }

-/**
- * VmbusChannelSendPacketPageBuffer - Send a range of single-page buffer packets using a GPADL Direct packet type.
+/*
+ * VmbusChannelSendPacketPageBuffer - Send a range of single-page
+buffer
+ * packets using a GPADL Direct packet type.
  */
 int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
                                     struct hv_page_buffer PageBuffers[], @@ -773,8 +777,9 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
        return ret;
 }

-/**
- * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer packet using a GPADL Direct packet type.
+/*
+ * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer
+packet
+ * using a GPADL Direct packet type.
  */
 int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
                                struct hv_multipage_buffer *MultiPageBuffer, @@ -842,7 +847,7 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
        return ret;
 }

-/**
+/*
  * VmbusChannelRecvPacket - Retrieve the user packet on the specified channel
  */
 /* TODO: Do we ever receive a gpa direct packet other than the ones we send ? */ @@ -908,7 +913,7 @@ int VmbusChannelRecvPacket(struct vmbus_channel *Channel, void *Buffer,
        return 0;
 }

-/**
+/*
  * VmbusChannelRecvPacketRaw - Retrieve the raw packet on the specified channel
  */
 int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer, @@ -971,7 +976,7 @@ int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer,
        return 0;
 }

-/**
+/*
  * VmbusChannelOnChannelEvent - Channel event callback
  */
 void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel) @@ -984,7 +989,7 @@ void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
        mod_timer(&Channel->poll_timer, jiffies + usecs_to_jiffies(100));  }

-/**
+/*
  * VmbusChannelOnTimer - Timer event callback
  */
 void VmbusChannelOnTimer(unsigned long data) @@ -995,7 +1000,7 @@ void VmbusChannelOnTimer(unsigned long data)
                channel->OnChannelCallback(channel->ChannelCallbackContext);
 }

-/**
+/*
  * DumpVmbusChannel - Dump vmbus channel info to the console
  */
 static void DumpVmbusChannel(struct vmbus_channel *Channel) diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index ef38467..cc4b93c 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -70,7 +70,7 @@ static const struct hv_guid
        },
 };

-/**
+/*
  * AllocVmbusChannel - Allocate and initialize a vmbus channel object
  */
 struct vmbus_channel *AllocVmbusChannel(void) @@ -96,7 +96,7 @@ struct vmbus_channel *AllocVmbusChannel(void)
        return channel;
 }

-/**
+/*
  * ReleaseVmbusChannel - Release the vmbus channel object itself
  */
 static inline void ReleaseVmbusChannel(void *context) @@ -114,7 +114,7 @@ static inline void ReleaseVmbusChannel(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * FreeVmbusChannel - Release the resources used by the vmbus channel object
  */
 void FreeVmbusChannel(struct vmbus_channel *Channel) @@ -130,7 +130,7 @@ void FreeVmbusChannel(struct vmbus_channel *Channel)
                              Channel);
 }

-/**
+/*
  * VmbusChannelProcessOffer - Process the offer by creating a channel/device associated with this offer
  */
 static void VmbusChannelProcessOffer(void *context) @@ -212,7 +212,7 @@ static void VmbusChannelProcessOffer(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelProcessRescindOffer - Rescind the offer by initiating a device removal
  */
 static void VmbusChannelProcessRescindOffer(void *context) @@ -224,7 +224,7 @@ static void VmbusChannelProcessRescindOffer(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOffer - Handler for channel offers from vmbus in parent partition.
  *
  * We ignore all offers except network and storage offers. For each network and @@ -307,7 +307,7 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOfferRescind - Rescind offer handler.
  *
  * We queue a work item to process this offer synchronously @@ -334,7 +334,7 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOffersDelivered - This is invoked when all offers have been delivered.
  *
  * Nothing to do here.
@@ -346,7 +346,7 @@ static void VmbusChannelOnOffersDelivered(
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOpenResult - Open result handler.
  *
  * This is invoked when we received a response to our channel open request.
@@ -394,7 +394,7 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnGpadlCreated - GPADL created handler.
  *
  * This is invoked when we received a response to our gpadl create request.
@@ -446,7 +446,7 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnGpadlTorndown - GPADL torndown handler.
  *
  * This is invoked when we received a response to our gpadl teardown request.
@@ -494,7 +494,7 @@ static void VmbusChannelOnGpadlTorndown(
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnVersionResponse - Version response handler
  *
  * This is invoked when we received a response to our initiate contact request.
@@ -557,7 +557,7 @@ static struct vmbus_channel_message_table_entry
        {ChannelMessageUnload,                  NULL},
 };

-/**
+/*
  * VmbusOnChannelMessage - Handler for channel protocol messages.
  *
  * This is invoked in the vmbus worker thread context.
@@ -596,7 +596,7 @@ void VmbusOnChannelMessage(void *Context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelRequestOffers - Send a request to get all our pending offers.
  */
 int VmbusChannelRequestOffers(void)
@@ -650,8 +650,9 @@ Cleanup:
        return ret;
 }

-/**
- * VmbusChannelReleaseUnattachedChannels - Release channels that are unattached/unconnected ie (no drivers associated)
+/*
+ * VmbusChannelReleaseUnattachedChannels - Release channels that are
+ * unattached/unconnected ie (no drivers associated)
  */
 void VmbusChannelReleaseUnattachedChannels(void)
 {
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c index 43c2e68..894aa37 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -33,7 +33,7 @@ struct VMBUS_CONNECTION gVmbusConnection = {
        .NextGpadlHandle        = ATOMIC_INIT(0xE1E10),
 };

-/**
+/*
  * VmbusConnect - Sends a connect request on the partition service connection
  */
 int VmbusConnect(void)
@@ -179,7 +179,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * VmbusDisconnect - Sends a disconnect request on the partition service connection
  */
 int VmbusDisconnect(void)
@@ -217,7 +217,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * GetChannelFromRelId - Get the channel object given its child relative id (ie channel id)
  */
 struct vmbus_channel *GetChannelFromRelId(u32 relId) @@ -238,7 +238,7 @@ struct vmbus_channel *GetChannelFromRelId(u32 relId)
        return foundChannel;
 }

-/**
+/*
  * VmbusProcessChannelEvent - Process a channel event notification
  */
 static void VmbusProcessChannelEvent(void *context) @@ -266,7 +266,7 @@ static void VmbusProcessChannelEvent(void *context)
        }
 }

-/**
+/*
  * VmbusOnEvents - Handler for events
  */
 void VmbusOnEvents(void)
@@ -307,7 +307,7 @@ void VmbusOnEvents(void)
        return;
 }

-/**
+/*
  * VmbusPostMessage - Send a msg on the vmbus's message connection
  */
 int VmbusPostMessage(void *buffer, size_t bufferLen) @@ -319,7 +319,7 @@ int VmbusPostMessage(void *buffer, size_t bufferLen)
        return HvPostMessage(connId, 1, buffer, bufferLen);  }

-/**
+/*
  * VmbusSetEvent - Send an event notification to the parent
  */
 int VmbusSetEvent(u32 childRelId)
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 51149e6..9bee568 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -34,7 +34,7 @@ struct hv_context gHvContext = {
        .SignalEventBuffer      = NULL,
 };

-/**
+/*
  * HvQueryHypervisorPresence - Query the cpuid for presense of windows hypervisor
  */
 static int HvQueryHypervisorPresence(void) @@ -55,7 +55,7 @@ static int HvQueryHypervisorPresence(void)
        return ecx & HV_PRESENT_BIT;
 }

-/**
+/*
  * HvQueryHypervisorInfo - Get version info of the windows hypervisor
  */
 static int HvQueryHypervisorInfo(void)
@@ -124,7 +124,7 @@ static int HvQueryHypervisorInfo(void)
        return maxLeaf;
 }

-/**
+/*
  * HvDoHypercall - Invoke the specified hypercall
  */
 static u64 HvDoHypercall(u64 Control, void *Input, void *Output) @@ -179,7 +179,7 @@ static u64 HvDoHypercall(u64 Control, void *Input, void *Output)  #endif /* !x86_64 */  }

-/**
+/*
  * HvInit - Main initialization routine.
  *
  * This routine must be called before any other routines in here are called @@ -293,7 +293,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * HvCleanup - Cleanup routine.
  *
  * This routine is called normally during driver unloading or exiting.
@@ -320,7 +320,7 @@ void HvCleanup(void)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * HvPostMessage - Post a message using the hypervisor message IPC.
  *
  * This involves a hypercall.
@@ -361,7 +361,7 @@ u16 HvPostMessage(union hv_connection_id connectionId,  }


-/**
+/*
  * HvSignalEvent - Signal an event on the specified connection using the hypervisor event IPC.
  *
  * This involves a hypercall.
@@ -375,7 +375,7 @@ u16 HvSignalEvent(void)
        return status;
 }

-/**
+/*
  * HvSynicInit - Initialize the Synthethic Interrupt Controller.
  *
  * If it is already initialized by another entity (ie x2v shim), we need to @@ -481,7 +481,7 @@ Cleanup:
        return;
 }

-/**
+/*
  * HvSynicCleanup - Cleanup routine for HvSynicInit().
  */
 void HvSynicCleanup(void *arg)
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 1c717f9..bd739ac 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -166,7 +166,7 @@ static struct netvsc_device *ReleaseInboundNetDevice(struct hv_device *Device)
        return netDevice;
 }

-/**
+/*
  * NetVscInitialize - Main entry point
  */
 int NetVscInitialize(struct hv_driver *drv) @@ -704,7 +704,7 @@ static void NetVscDisconnectFromVsp(struct netvsc_device *NetDevice)
        DPRINT_EXIT(NETVSC);
 }

-/**
+/*
  * NetVscOnDeviceAdd - Callback when the device belonging to this driver is added
  */
 static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo) @@ -806,7 +806,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * NetVscOnDeviceRemove - Callback when the root bus device is removed
  */
 static int NetVscOnDeviceRemove(struct hv_device *Device) @@ -863,7 +863,7 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
        return 0;
 }

-/**
+/*
  * NetVscOnCleanup - Perform any cleanup when the driver is removed
  */
 static void NetVscOnCleanup(struct hv_driver *drv) diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index 38ea140..5a09d08 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -532,7 +532,7 @@ static int StorVscConnectToVsp(struct hv_device *Device)
        return ret;
 }

-/**
+/*
  * StorVscOnDeviceAdd - Callback when the device belonging to this driver is added
  */
 static int StorVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo) @@ -584,7 +584,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * StorVscOnDeviceRemove - Callback when the our device is being removed
  */
 static int StorVscOnDeviceRemove(struct hv_device *Device) @@ -682,7 +682,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * StorVscOnIORequest - Callback to initiate an I/O request
  */
 static int StorVscOnIORequest(struct hv_device *Device, @@ -782,7 +782,7 @@ static int StorVscOnIORequest(struct hv_device *Device,
        return ret;
 }

-/**
+/*
  * StorVscOnCleanup - Perform any cleanup when the driver is removed
  */
 static void StorVscOnCleanup(struct hv_driver *Driver) @@ -791,7 +791,7 @@ static void StorVscOnCleanup(struct hv_driver *Driver)
        DPRINT_EXIT(STORVSC);
 }

-/**
+/*
  * StorVscInitialize - Main entry point
  */
 int StorVscInitialize(struct hv_driver *Driver) diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO index dbfbde9..78d957e 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -1,6 +1,5 @@
 TODO:
        - fix remaining checkpatch warnings and errors
-       - use of /** when it is not a kerneldoc header
        - remove RingBuffer.c to us in-kernel ringbuffer functions instead.
        - audit the vmbus to verify it is working properly with the
          driver model
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index 3d0a240..9a6a340 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -51,7 +51,7 @@ static const struct hv_guid gVmbusDeviceId = {  static struct hv_driver *gDriver; /* vmbus driver object */  static struct hv_device *gDevice; /* vmbus root device */

-/**
+/*
  * VmbusGetChannelOffers - Retrieve the channel offers from the parent partition
  */
 static void VmbusGetChannelOffers(void) @@ -61,7 +61,7 @@ static void VmbusGetChannelOffers(void)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusGetChannelInterface - Get the channel interface
  */
 static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface) @@ -69,7 +69,7 @@ static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
        GetChannelInterface(Interface);
 }

-/**
+/*
  * VmbusGetChannelInfo - Get the device info for the specified device object
  */
 static void VmbusGetChannelInfo(struct hv_device *DeviceObject, @@ -78,7 +78,7 @@ static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
        GetChannelInfo(DeviceObject, DeviceInfo);  }

-/**
+/*
  * VmbusCreateChildDevice - Creates the child device on the bus that represents the channel offer
  */
 struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType, @@ -91,7 +91,7 @@ struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
                                                Context);
 }

-/**
+/*
  * VmbusChildDeviceAdd - Registers the child device with the vmbus
  */
 int VmbusChildDeviceAdd(struct hv_device *ChildDevice) @@ -101,7 +101,7 @@ int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
        return vmbusDriver->OnChildDeviceAdd(gDevice, ChildDevice);  }

-/**
+/*
  * VmbusChildDeviceRemove Unregisters the child device from the vmbus
  */
 void VmbusChildDeviceRemove(struct hv_device *ChildDevice) @@ -111,7 +111,7 @@ void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
        vmbusDriver->OnChildDeviceRemove(ChildDevice);
 }

-/**
+/*
  * VmbusOnDeviceAdd - Callback when the root bus device is added
  */
 static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo) @@ -140,7 +140,7 @@ static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
        return ret;
 }

-/**
+/*
  * VmbusOnDeviceRemove - Callback when the root bus device is removed
  */
 static int VmbusOnDeviceRemove(struct hv_device *dev) @@ -156,7 +156,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev)
        return ret;
 }

-/**
+/*
  * VmbusOnCleanup - Perform any cleanup when the driver is removed
  */
 static void VmbusOnCleanup(struct hv_driver *drv) @@ -168,7 +168,7 @@ static void VmbusOnCleanup(struct hv_driver *drv)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusOnMsgDPC - DPC routine to handle messages from the hypervisior
  */
 static void VmbusOnMsgDPC(struct hv_driver *drv) @@ -216,7 +216,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv)
        }
 }

-/**
+/*
  * VmbusOnEventDPC - DPC routine to handle events from the hypervisior
  */
 static void VmbusOnEventDPC(struct hv_driver *drv) @@ -225,7 +225,7 @@ static void VmbusOnEventDPC(struct hv_driver *drv)
        VmbusOnEvents();
 }

-/**
+/*
  * VmbusOnISR - ISR routine
  */
 static int VmbusOnISR(struct hv_driver *drv) @@ -263,7 +263,7 @@ static int VmbusOnISR(struct hv_driver *drv)
        return ret;
 }

-/**
+/*
  * VmbusInitialize - Main entry point
  */
 int VmbusInitialize(struct hv_driver *drv) diff --git a/drivers/staging/hv/VmbusApi.h b/drivers/staging/hv/VmbusApi.h index d089bb1..2e3a3b8 100644
--- a/drivers/staging/hv/VmbusApi.h
+++ b/drivers/staging/hv/VmbusApi.h
@@ -84,6 +84,25 @@ struct hv_device_info {
        struct hv_dev_port_info Outbound;
 };

+/**
+ * struct vmbus_channel_interface - Contains member functions for vmbus channel
+ * @Open:      Open the channel
+ * @Close:     Close the channel
+ * @SendPacket:        Send a packet over the channel
+ * @SendPacketPageBuffer:      Send a single page buffer over the channel
+ * @SendPacketMultiPageBuffer: Send a multiple page buffers
+ * @RecvPacket:        Receive packet
+ * @RecvPacketRaw:     Receive Raw packet
+ * @EstablishGpadl:    Set up GPADL for ringbuffer
+ * @TeardownGpadl:     Teardown GPADL for ringbuffer
+ * @GetInfo:   Get info about the channel
+ *
+ * This structure contains function pointer to control vmbus channel
+ * behavior.
+ * None of these functions is externally callable, but they are used
+for normal
+ * vmbus channel internal behavior.
+ * Only used by Hyper-V drivers.
+ */
 struct vmbus_channel_interface {
        int (*Open)(struct hv_device *Device, u32 SendBufferSize,
                    u32 RecvRingBufferSize, void *UserData, u32 UserDataLen, diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index abeac12..c90a6aa 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -164,7 +164,7 @@ static struct block_device_operations block_ops = {
        .ioctl  = blkvsc_ioctl,
 };

-/**
+/*
  * blkvsc_drv_init -  BlkVsc driver initialization.
  */
 static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) @@ -244,7 +244,7 @@ static void blkvsc_drv_exit(void)
        return;
 }

-/**
+/*
  * blkvsc_probe - Add a new device for this driver
  */
 static int blkvsc_probe(struct device *device) @@ -732,7 +732,7 @@ static int blkvsc_do_read_capacity16(struct block_device_context *blkdev)
        return 0;
 }

-/**
+/*
  * blkvsc_remove() - Callback when our device is removed
  */
 static int blkvsc_remove(struct device *device) diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 1af3dcb..933597e 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -265,7 +265,7 @@ retry_send:
        return ret;
 }

-/**
+/*
  * netvsc_linkstatus_callback - Link up/down notification
  */
 static void netvsc_linkstatus_callback(struct hv_device *device_obj, @@ -292,7 +292,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
        DPRINT_EXIT(NETVSC_DRV);
 }

-/**
+/*
  * netvsc_recv_callback -  Callback when we receive a packet from the "wire" on the specified device.
  */
 static int netvsc_recv_callback(struct hv_device *device_obj, diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 3a4793a..5afa94e 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -58,6 +58,15 @@ void *osd_VirtualAllocExec(unsigned int size)  #endif  }

+/**
+ * osd_PageAlloc() - Allocate pages
+ * @count:      Total number of Kernel pages you want to allocate
+ *
+ * Tries to allocate @count number of consecutive free kernel pages.
+ * And if successful, it will set the pages to 0 before returning.
+ * If successfull it will return pointer to the @count pages.
+ * Mainly used by Hyper-V drivers.
+ */
 void *osd_PageAlloc(unsigned int count)  {
        void *p;
@@ -77,6 +86,14 @@ void *osd_PageAlloc(unsigned int count)  }  EXPORT_SYMBOL_GPL(osd_PageAlloc);

+/**
+ * osd_PageFree() - Free pages
+ * @page:       Pointer to the first page to be freed
+ * @count:      Total number of Kernel pages you free
+ *
+ * Frees the pages allocated by osd_PageAlloc()
+ * Mainly used by Hyper-V drivers.
+ */
 void osd_PageFree(void *page, unsigned int count)  {
        free_pages((unsigned long)page, get_order(count * PAGE_SIZE)); @@ -85,6 +102,17 @@ void osd_PageFree(void *page, unsigned int count)  }  EXPORT_SYMBOL_GPL(osd_PageFree);

+/**
+ * osd_WaitEventCreate() - Create the event queue
+ *
+ * Allocates memory for a &struct osd_waitevent. And than calls
+ * init_waitqueue_head to set up the wait queue for the event.
+ * This structure is usually part of a another structure that contains
+ * the actual Hyper-V device driver structure.
+ *
+ * Returns pointer to &struct osd_waitevent
+ * Mainly used by Hyper-V drivers.
+ */
 struct osd_waitevent *osd_WaitEventCreate(void)  {
        struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent), @@ -98,6 +126,19 @@ struct osd_waitevent *osd_WaitEventCreate(void)  }  EXPORT_SYMBOL_GPL(osd_WaitEventCreate);

+
+/**
+ * osd_WaitEventSet() - Wake up the process
+ * @waitEvent: Structure to event to be woken up
+ *
+ * @waitevent is of type @struct osd_waitevent
+ *
+ * Wake up the sleeping process so it can do some work.
+ * And set condition indicator in struct osd_waitevent to indicate
+ * the process is in a woken state.
+ *
+ * Only used by Network and Storage Hyper-V drivers.
+ */
 void osd_WaitEventSet(struct osd_waitevent *waitEvent)  {
        waitEvent->condition = 1;
@@ -105,6 +146,20 @@ void osd_WaitEventSet(struct osd_waitevent *waitEvent)  }  EXPORT_SYMBOL_GPL(osd_WaitEventSet);

+/**
+ * osd_WaitEventWait() - Wait for event till condition is true
+ * @waitEvent: Structure to event to be put to sleep
+ *
+ * @waitevent is of type @struct osd_waitevent
+ *
+ * Set up the process to sleep until waitEvent->condition get true.
+ * And set condition indicator in struct osd_waitevent to indicate
+ * the process is in a sleeping state.
+ *
+ * Returns the status of 'wait_event_interruptible()' system call
+ *
+ * Mainly used by Hyper-V drivers.
+ */
 int osd_WaitEventWait(struct osd_waitevent *waitEvent)  {
        int ret = 0;
@@ -116,6 +171,21 @@ int osd_WaitEventWait(struct osd_waitevent *waitEvent)  }  EXPORT_SYMBOL_GPL(osd_WaitEventWait);

+/**
+ * osd_WaitEventWaitEx() - Wait for event or timeout for process wakeup
+ * @waitEvent: Structure to event to be put to sleep
+ * @TimeoutInMs:       Total number of Milliseconds to wait before waking up
+ *
+ * @waitevent is of type @struct osd_waitevent
+ * Set up the process to sleep until @waitEvent->condition get true or
+ * @TimeoutInMs (Time out in Milliseconds) has been reached.
+ * And set condition indicator in struct osd_waitevent to indicate
+ * the process is in a sleeping state.
+ *
+ * Returns the status of 'wait_event_interruptible_timeout()' system
+call
+ *
+ * Mainly used by Hyper-V drivers.
+ */
 int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs)  {
        int ret = 0;
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 3988f4b..7676ba5 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -129,7 +129,7 @@ static struct scsi_host_template scsi_driver = {  };


-/**
+/*
  * storvsc_drv_init - StorVsc driver initialization.
  */
 static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) @@ -222,7 +222,7 @@ static void storvsc_drv_exit(void)
        return;
 }

-/**
+/*
  * storvsc_probe - Add a new device for this driver
  */
 static int storvsc_probe(struct device *device) @@ -318,7 +318,7 @@ static int storvsc_probe(struct device *device)
        return ret;
 }

-/**
+/*
  * storvsc_remove - Callback when our device is removed
  */
 static int storvsc_remove(struct device *device) @@ -371,7 +371,7 @@ static int storvsc_remove(struct device *device)
        return ret;
 }

-/**
+/*
  * storvsc_commmand_completion - Command completion processing
  */
 static void storvsc_commmand_completion(struct hv_storvsc_request *request) @@ -622,7 +622,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
        return total_copied;
 }

-/**
+/*
  * storvsc_queuecommand - Initiate command processing
  */
 static int storvsc_queuecommand(struct scsi_cmnd *scmnd, @@ -823,7 +823,7 @@ static int storvsc_merge_bvec(struct request_queue *q,
        return bvec->bv_len;
 }

-/**
+/*
  * storvsc_device_configure - Configure the specified scsi device
  */
 static int storvsc_device_alloc(struct scsi_device *sdevice) @@ -862,7 +862,7 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
        return 0;
 }

-/**
+/*
  * storvsc_host_reset_handler - Reset the scsi HBA
  */
 static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 2c90619..177f565 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -128,7 +128,7 @@ static struct vmbus_driver_context g_vmbus_drv = {
        .bus.dev_attrs =        vmbus_device_attrs,
 };

-/**
+/*
  * vmbus_show_device_attr - Show the device attribute in sysfs.
  *
  * This is invoked when user does a
@@ -232,7 +232,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
        }
 }

-/**
+/*
  * vmbus_bus_init -Main vmbus driver initialization routine.
  *
  * Here, we
@@ -361,7 +361,7 @@ cleanup:
        return ret;
 }

-/**
+/*
  * vmbus_bus_exit - Terminate the vmbus driver.
  *
  * This routine is opposite of vmbus_bus_init() @@ -397,8 +397,18 @@ static void vmbus_bus_exit(void)
        return;
 }

+
 /**
- * vmbus_child_driver_register - Register a vmbus's child driver
+ * vmbus_child_driver_register() - Register a vmbus's child driver
+ * @driver_ctx:        Pointer to driver structure you want to register
+ *
+ * @driver_ctx is of type &struct driver_context
+ *
+ * Registers the given driver with Linux through the
+ 'driver_register()' call
+ * And sets up the hyper-v vmbus handling for this driver.
+ * It will return the state of the 'driver_register()' call.
+ *
+ * Mainly used by Hyper-V drivers.
  */
 int vmbus_child_driver_register(struct driver_context *driver_ctx)  { @@ -424,7 +434,15 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx)  EXPORT_SYMBOL(vmbus_child_driver_register);

 /**
- * vmbus_child_driver_unregister Unregister a vmbus's child driver
+ * vmbus_child_driver_unregister() - Unregister a vmbus's child driver
+ * @driver_ctx:        Pointer to driver structure you want to un-register
+ *
+ * @driver_ctx is of type &struct driver_context
+ *
+ * Un-register the given driver with Linux through the 'driver_unregister()'
+ * call. And ungegisters the driver from the Hyper-V vmbus handler.
+ *
+ * Mainly used by Hyper-V drivers.
  */
 void vmbus_child_driver_unregister(struct driver_context *driver_ctx)  { @@ -442,9 +460,15 @@ void vmbus_child_driver_unregister(struct driver_context *driver_ctx)  EXPORT_SYMBOL(vmbus_child_driver_unregister);

 /**
- * vmbus_get_interface - Get the vmbus channel interface.
+ * vmbus_get_interface() - Get the vmbus channel interface.
+ * @interface: Pointer to channel interface structure
+ *
+ * Get the Hyper-V channel used for the driver.
+ *
+ * @interface is of type &struct vmbus_channel_interface
+ * This is invoked by child/client driver that sits above vmbus.
  *
- * This is invoked by child/client driver that sits above vmbus
+ * Mainly used by Hyper-V drivers.
  */
 void vmbus_get_interface(struct vmbus_channel_interface *interface)  { @@ -454,7 +478,7 @@ void vmbus_get_interface(struct vmbus_channel_interface *interface)  }  EXPORT_SYMBOL(vmbus_get_interface);

-/**
+/*
  * vmbus_child_device_get_info - Get the vmbus child device info.
  *
  * This is invoked to display various device attributes in sysfs.
@@ -467,8 +491,9 @@ static void vmbus_child_device_get_info(struct hv_device *device_obj,
        vmbus_drv_obj->GetChannelInfo(device_obj, device_info);  }

-/**
- * vmbus_child_device_create - Creates and registers a new child device on the vmbus.
+/*
+ * vmbus_child_device_create - Creates and registers a new child device
+ * on the vmbus.
  */
 static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
                                                   struct hv_guid *instance,
@@ -522,7 +547,7 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
        return child_device_obj;
 }

-/**
+/*
  * vmbus_child_device_register - Register the child device on the specified bus
  */
 static int vmbus_child_device_register(struct hv_device *root_device_obj, @@ -570,8 +595,9 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
        return ret;
 }

-/**
- * vmbus_child_device_unregister - Remove the specified child device from the vmbus.
+/*
+ * vmbus_child_device_unregister - Remove the specified child device
+ * from the vmbus.
  */
 static void vmbus_child_device_unregister(struct hv_device *device_obj)  { @@ -594,7 +620,7 @@ static void vmbus_child_device_unregister(struct hv_device *device_obj)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_child_device_destroy - Destroy the specified child device on the vmbus.
  */
 static void vmbus_child_device_destroy(struct hv_device *device_obj) @@ -604,7 +630,7 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_uevent - add uevent for our device
  *
  * This routine is invoked when a device is added or removed on the vmbus to @@ -683,7 +709,7 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
        return 0;
 }

-/**
+/*
  * vmbus_match - Attempt to match the specified device to the specified driver
  */
 static int vmbus_match(struct device *device, struct device_driver *driver) @@ -718,7 +744,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
        return match;
 }

-/**
+/*
  * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
  *
  * We need a callback because we cannot invoked device_unregister() inside @@ -741,7 +767,7 @@ static void vmbus_probe_failed_cb(struct work_struct *context)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_probe - Add the new vmbus's child device
  */
 static int vmbus_probe(struct device *child_device) @@ -777,7 +803,7 @@ static int vmbus_probe(struct device *child_device)
        return ret;
 }

-/**
+/*
  * vmbus_remove - Remove a vmbus device
  */
 static int vmbus_remove(struct device *child_device) @@ -819,7 +845,7 @@ static int vmbus_remove(struct device *child_device)
        return 0;
 }

-/**
+/*
  * vmbus_shutdown - Shutdown a vmbus device
  */
 static void vmbus_shutdown(struct device *child_device) @@ -855,7 +881,7 @@ static void vmbus_shutdown(struct device *child_device)
        return;
 }

-/**
+/*
  * vmbus_bus_release - Final callback release of the vmbus root device
  */
 static void vmbus_bus_release(struct device *device) @@ -869,7 +895,7 @@ static void vmbus_bus_release(struct device *device)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_device_release - Final callback release of the vmbus child device
  */
 static void vmbus_device_release(struct device *device) @@ -887,7 +913,7 @@ static void vmbus_device_release(struct device *device)
        return;
 }

-/**
+/*
  * vmbus_msg_dpc - Tasklet routine to handle hypervisor messages
  */
 static void vmbus_msg_dpc(unsigned long data) @@ -904,7 +930,7 @@ static void vmbus_msg_dpc(unsigned long data)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_msg_dpc - Tasklet routine to handle hypervisor events
  */
 static void vmbus_event_dpc(unsigned long data)

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format
  2010-03-04 17:48 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format Hank Janssen
@ 2010-03-04 17:55   ` Joe Perches
  2010-03-04 18:03   ` Randy Dunlap
  1 sibling, 0 replies; 16+ messages in thread
From: Joe Perches @ 2010-03-04 17:55 UTC (permalink / raw)
  To: Hank Janssen
  Cc: 'linux-kernel@vger.kernel.org',
	devel, virtualization, Haiyang Zhang, Hashir Abdi, Greg KH

On Thu, 2010-03-04 at 17:48 +0000, Hank Janssen wrote:
> From: Hank Janssen <hjanssen@microsoft.com>
> 
> Removed kerneldoc /** from functions that should not have them.
> Added proper kerneldoc headers to functions that should have them.
> diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index d46eb14..1fc2710 100644
> --- a/drivers/staging/hv/Channel.c
> +++ b/drivers/staging/hv/Channel.c
> @@ -64,8 +64,9 @@ static void DumpMonitorPage(struct hv_monitor_page *MonitorPage)  }  #endif
> 
> -/**
> - * VmbusChannelSetEvent - Trigger an event notification on the specified channel.
> +/*
> + * VmbusChannelSetEvent - Trigger an event notification on the
> +specified
> + * channel.
>   */
>  static void VmbusChannelSetEvent(struct vmbus_channel *Channel)  { @@ -119,7 +120,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)  }
> 
>  #endif

Yuck.

I don't know what you used for comment wrapping,
but it's broken here and in a bunch of other places.

Some are shown below:

[]

> -/**
> - * VmbusChannelSendPacketPageBuffer - Send a range of single-page buffer packets using a GPADL Direct packet type.
> +/*
> + * VmbusChannelSendPacketPageBuffer - Send a range of single-page
> +buffer
> + * packets using a GPADL Direct packet type.
>   */
>  int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
>                                      struct hv_page_buffer PageBuffers[], @@ -773,8 +777,9 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
>         return ret;
>  }
> 
> -/**
> - * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer packet using a GPADL Direct packet type.
> +/*
> + * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer
> +packet
> + * using a GPADL Direct packet type.
>   */
>  int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
>                                 struct hv_multipage_buffer *MultiPageBuffer, @@ -842,7 +847,7 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
>         return ret;
>  }



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format
  2010-03-04 17:48 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format Hank Janssen
  2010-03-04 17:55   ` Joe Perches
@ 2010-03-04 18:03   ` Randy Dunlap
  2010-03-04 18:11     ` Hank Janssen
  1 sibling, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2010-03-04 18:03 UTC (permalink / raw)
  To: Hank Janssen
  Cc: 'linux-kernel@vger.kernel.org',
	devel, virtualization, Greg KH, Haiyang Zhang, Hashir Abdi

On Thu, 4 Mar 2010 17:48:18 +0000 Hank Janssen wrote:

> 
> From: Hank Janssen <hjanssen@microsoft.com>
> 
> Removed kerneldoc /** from functions that should not have them.
> Added proper kerneldoc headers to functions that should have them.

Hi,

Most of the patch looks good.  I found a few nits to pick.
Please see below.

> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> 
> ---
>  drivers/staging/hv/Channel.c     |   49 ++++++++++++++-----------
>  drivers/staging/hv/ChannelMgmt.c |   33 +++++++++--------
>  drivers/staging/hv/Connection.c  |   14 ++++----
>  drivers/staging/hv/Hv.c          |   18 +++++-----
>  drivers/staging/hv/NetVsc.c      |    8 ++--
>  drivers/staging/hv/StorVsc.c     |   10 +++---
>  drivers/staging/hv/TODO          |    1 -
>  drivers/staging/hv/Vmbus.c       |   26 +++++++-------
>  drivers/staging/hv/VmbusApi.h    |   19 ++++++++++
>  drivers/staging/hv/blkvsc_drv.c  |    6 ++--
>  drivers/staging/hv/netvsc_drv.c  |    4 +-
>  drivers/staging/hv/osd.c         |   70 +++++++++++++++++++++++++++++++++++
>  drivers/staging/hv/storvsc_drv.c |   14 ++++----
>  drivers/staging/hv/vmbus_drv.c   |   74 +++++++++++++++++++++++++------------
>  14 files changed, 233 insertions(+), 113 deletions(-)



diff --git a/drivers/staging/hv/VmbusApi.h b/drivers/staging/hv/VmbusApi.h index d089bb1..2e3a3b8 100644
> --- a/drivers/staging/hv/VmbusApi.h
> +++ b/drivers/staging/hv/VmbusApi.h
> @@ -84,6 +84,25 @@ struct hv_device_info {
>         struct hv_dev_port_info Outbound;
>  };
> 
> +/**
> + * struct vmbus_channel_interface - Contains member functions for vmbus channel
> + * @Open:      Open the channel
> + * @Close:     Close the channel
> + * @SendPacket:        Send a packet over the channel
> + * @SendPacketPageBuffer:      Send a single page buffer over the channel
> + * @SendPacketMultiPageBuffer: Send a multiple page buffers
> + * @RecvPacket:        Receive packet
> + * @RecvPacketRaw:     Receive Raw packet
> + * @EstablishGpadl:    Set up GPADL for ringbuffer
> + * @TeardownGpadl:     Teardown GPADL for ringbuffer
> + * @GetInfo:   Get info about the channel
> + *
> + * This structure contains function pointer to control vmbus channel
> + * behavior.
> + * None of these functions is externally callable, but they are used
> +for normal

There appears to be some unwanted line breaking ^here^.

> + * vmbus channel internal behavior.
> + * Only used by Hyper-V drivers.
> + */
>  struct vmbus_channel_interface {
>         int (*Open)(struct hv_device *Device, u32 SendBufferSize,
>                     u32 RecvRingBufferSize, void *UserData, u32 UserDataLen, diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index abeac12..c90a6aa 100644


and why are those 2 lines above joined/merged?
I suspect that it will be a bit difficult for Greg to apply this patch.


diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 3a4793a..5afa94e 100644
> --- a/drivers/staging/hv/osd.c
> +++ b/drivers/staging/hv/osd.c
> @@ -77,6 +86,14 @@ void *osd_PageAlloc(unsigned int count)  }  EXPORT_SYMBOL_GPL(osd_PageAlloc);
> 
> +/**
> + * osd_PageFree() - Free pages
> + * @page:       Pointer to the first page to be freed
> + * @count:      Total number of Kernel pages you free
> + *
> + * Frees the pages allocated by osd_PageAlloc()
> + * Mainly used by Hyper-V drivers.
> + */
>  void osd_PageFree(void *page, unsigned int count)  {
>         free_pages((unsigned long)page, get_order(count * PAGE_SIZE)); @@ -85,6 +102,17 @@ void osd_PageFree(void *page, unsigned int count)  }  EXPORT_SYMBOL_GPL(osd_PageFree);
> 
> +/**
> + * osd_WaitEventCreate() - Create the event queue
> + *
> + * Allocates memory for a &struct osd_waitevent. And than calls

aha.  Correct struct reference, using '&'.  :)

> + * init_waitqueue_head to set up the wait queue for the event.
> + * This structure is usually part of a another structure that contains
> + * the actual Hyper-V device driver structure.
> + *
> + * Returns pointer to &struct osd_waitevent
> + * Mainly used by Hyper-V drivers.
> + */
>  struct osd_waitevent *osd_WaitEventCreate(void)  {
>         struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent), @@ -98,6 +126,19 @@ struct osd_waitevent *osd_WaitEventCreate(void)  }  EXPORT_SYMBOL_GPL(osd_WaitEventCreate);
> 
> +
> +/**
> + * osd_WaitEventSet() - Wake up the process
> + * @waitEvent: Structure to event to be woken up
> + *
> + * @waitevent is of type @struct osd_waitevent

Use '&' here also.

> + *
> + * Wake up the sleeping process so it can do some work.
> + * And set condition indicator in struct osd_waitevent to indicate
> + * the process is in a woken state.
> + *
> + * Only used by Network and Storage Hyper-V drivers.
> + */
>  void osd_WaitEventSet(struct osd_waitevent *waitEvent)  {
>         waitEvent->condition = 1;
> @@ -105,6 +146,20 @@ void osd_WaitEventSet(struct osd_waitevent *waitEvent)  }  EXPORT_SYMBOL_GPL(osd_WaitEventSet);
> 
> +/**
> + * osd_WaitEventWait() - Wait for event till condition is true
> + * @waitEvent: Structure to event to be put to sleep
> + *
> + * @waitevent is of type @struct osd_waitevent

Use '&' here also.

> + *
> + * Set up the process to sleep until waitEvent->condition get true.
> + * And set condition indicator in struct osd_waitevent to indicate
> + * the process is in a sleeping state.
> + *
> + * Returns the status of 'wait_event_interruptible()' system call
> + *
> + * Mainly used by Hyper-V drivers.
> + */
>  int osd_WaitEventWait(struct osd_waitevent *waitEvent)  {
>         int ret = 0;
> @@ -116,6 +171,21 @@ int osd_WaitEventWait(struct osd_waitevent *waitEvent)  }  EXPORT_SYMBOL_GPL(osd_WaitEventWait);
> 
> +/**
> + * osd_WaitEventWaitEx() - Wait for event or timeout for process wakeup
> + * @waitEvent: Structure to event to be put to sleep
> + * @TimeoutInMs:       Total number of Milliseconds to wait before waking up
> + *
> + * @waitevent is of type @struct osd_waitevent

Use '&' here also.

> + * Set up the process to sleep until @waitEvent->condition get true or
> + * @TimeoutInMs (Time out in Milliseconds) has been reached.
> + * And set condition indicator in struct osd_waitevent to indicate
> + * the process is in a sleeping state.
> + *
> + * Returns the status of 'wait_event_interruptible_timeout()' system
> +call
> + *
> + * Mainly used by Hyper-V drivers.
> + */
>  int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs)  {
>         int ret = 0;



---
~Randy

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format
  2010-03-04 18:03   ` Randy Dunlap
@ 2010-03-04 18:11     ` Hank Janssen
  0 siblings, 0 replies; 16+ messages in thread
From: Hank Janssen @ 2010-03-04 18:11 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: 'linux-kernel@vger.kernel.org',
	devel, virtualization, Greg KH, Haiyang Zhang, Hashir Abdi



Randy and Joe,

Thanks for the feedback, let me correct it (not sure why the lines are messed up :() and resubmit!

Thanks,

Hank


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED
  2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
@ 2010-03-04 22:11   ` Hank Janssen
  2010-02-17 23:50 ` Greg KH
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Hank Janssen @ 2010-03-04 22:11 UTC (permalink / raw)
  To: Hank Janssen, 'linux-kernel@vger.kernel.org',
	devel, virtualization
  Cc: Haiyang Zhang, Hashir Abdi, Greg KH, joe, Randy Dunlap


From: Hank Janssen <hjanssen@microsoft.com>

Removed kerneldoc /** from functions that should not have them.
Added proper kerneldoc headers to functions that should have them.

This includes fixes as pointed out by Randy Dunlap and Joe Perches.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Joe Perches <joe@perches.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>


---
 drivers/staging/hv/Channel.c     |   49 ++++++++++++++-----------
 drivers/staging/hv/ChannelMgmt.c |   33 +++++++++--------
 drivers/staging/hv/Connection.c  |   14 ++++----
 drivers/staging/hv/Hv.c          |   18 +++++-----
 drivers/staging/hv/NetVsc.c      |    8 ++--
 drivers/staging/hv/StorVsc.c     |   10 +++---
 drivers/staging/hv/TODO          |    1 -
 drivers/staging/hv/Vmbus.c       |   26 +++++++-------
 drivers/staging/hv/VmbusApi.h    |   18 +++++++++
 drivers/staging/hv/blkvsc_drv.c  |    6 ++--
 drivers/staging/hv/netvsc_drv.c  |    7 ++--
 drivers/staging/hv/osd.c         |   70 +++++++++++++++++++++++++++++++++++
 drivers/staging/hv/storvsc_drv.c |   14 ++++----
 drivers/staging/hv/vmbus_drv.c   |   74 +++++++++++++++++++++++++------------
 14 files changed, 234 insertions(+), 114 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index d46eb14..1fc2710 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -64,8 +64,9 @@ static void DumpMonitorPage(struct hv_monitor_page *MonitorPage)
 }
 #endif

-/**
- * VmbusChannelSetEvent - Trigger an event notification on the specified channel.
+/*
+ * VmbusChannelSetEvent - Trigger an event notification on the specified
+ * channel.
  */
 static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 {
@@ -119,7 +120,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
 }

 #endif
-/**
+/*
  * VmbusChannelGetDebugInfo -Retrieve various channel debug info
  */
 void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
@@ -164,7 +165,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
        RingBufferGetDebugInfo(&Channel->Outbound, &DebugInfo->Outbound);
 }

-/**
+/*
  * VmbusChannelOpen - Open the specified channel.
  */
 int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
@@ -282,8 +283,9 @@ Cleanup:
        return 0;
 }

-/**
- * DumpGpadlBody - Dump the gpadl body message to the console for debugging purposes.
+/*
+ * DumpGpadlBody - Dump the gpadl body message to the console for
+ * debugging purposes.
  */
 static void DumpGpadlBody(struct vmbus_channel_gpadl_body *Gpadl, u32 Len)
 {
@@ -299,8 +301,9 @@ static void DumpGpadlBody(struct vmbus_channel_gpadl_body *Gpadl, u32 Len)
                           i, Gpadl->Pfn[i]);
 }

-/**
- * DumpGpadlHeader - Dump the gpadl header message to the console for debugging purposes.
+/*
+ * DumpGpadlHeader - Dump the gpadl header message to the console for
+ * debugging purposes.
  */
 static void DumpGpadlHeader(struct vmbus_channel_gpadl_header *Gpadl)
 {
@@ -324,7 +327,7 @@ static void DumpGpadlHeader(struct vmbus_channel_gpadl_header *Gpadl)
        }
 }

-/**
+/*
  * VmbusChannelCreateGpadlHeader - Creates a gpadl for the specified buffer
  */
 static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
@@ -440,7 +443,7 @@ static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
        return 0;
 }

-/**
+/*
  * VmbusChannelEstablishGpadl - Estabish a GPADL for the specified buffer
  *
  * @Channel: a channel
@@ -544,7 +547,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * VmbusChannelTeardownGpadl -Teardown the specified GPADL handle
  */
 int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
@@ -597,7 +600,7 @@ int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
        return ret;
 }

-/**
+/*
  * VmbusChannelClose - Close the specified channel
  */
 void VmbusChannelClose(struct vmbus_channel *Channel)
@@ -662,7 +665,7 @@ void VmbusChannelClose(struct vmbus_channel *Channel)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelSendPacket - Send the specified buffer on the given channel
  */
 int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer,
@@ -708,8 +711,9 @@ int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer,
        return ret;
 }

-/**
- * VmbusChannelSendPacketPageBuffer - Send a range of single-page buffer packets using a GPADL Direct packet type.
+/*
+ * VmbusChannelSendPacketPageBuffer - Send a range of single-page buffer
+ * packets using a GPADL Direct packet type.
  */
 int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
                                     struct hv_page_buffer PageBuffers[],
@@ -773,8 +777,9 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
        return ret;
 }

-/**
- * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer packet using a GPADL Direct packet type.
+/*
+ * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer packet
+ * using a GPADL Direct packet type.
  */
 int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
                                struct hv_multipage_buffer *MultiPageBuffer,
@@ -842,7 +847,7 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
        return ret;
 }

-/**
+/*
  * VmbusChannelRecvPacket - Retrieve the user packet on the specified channel
  */
 /* TODO: Do we ever receive a gpa direct packet other than the ones we send ? */
@@ -908,7 +913,7 @@ int VmbusChannelRecvPacket(struct vmbus_channel *Channel, void *Buffer,
        return 0;
 }

-/**
+/*
  * VmbusChannelRecvPacketRaw - Retrieve the raw packet on the specified channel
  */
 int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer,
@@ -971,7 +976,7 @@ int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer,
        return 0;
 }

-/**
+/*
  * VmbusChannelOnChannelEvent - Channel event callback
  */
 void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
@@ -984,7 +989,7 @@ void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
        mod_timer(&Channel->poll_timer, jiffies + usecs_to_jiffies(100));
 }

-/**
+/*
  * VmbusChannelOnTimer - Timer event callback
  */
 void VmbusChannelOnTimer(unsigned long data)
@@ -995,7 +1000,7 @@ void VmbusChannelOnTimer(unsigned long data)
                channel->OnChannelCallback(channel->ChannelCallbackContext);
 }

-/**
+/*
  * DumpVmbusChannel - Dump vmbus channel info to the console
  */
 static void DumpVmbusChannel(struct vmbus_channel *Channel)
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index ef38467..cc4b93c 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -70,7 +70,7 @@ static const struct hv_guid
        },
 };

-/**
+/*
  * AllocVmbusChannel - Allocate and initialize a vmbus channel object
  */
 struct vmbus_channel *AllocVmbusChannel(void)
@@ -96,7 +96,7 @@ struct vmbus_channel *AllocVmbusChannel(void)
        return channel;
 }

-/**
+/*
  * ReleaseVmbusChannel - Release the vmbus channel object itself
  */
 static inline void ReleaseVmbusChannel(void *context)
@@ -114,7 +114,7 @@ static inline void ReleaseVmbusChannel(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * FreeVmbusChannel - Release the resources used by the vmbus channel object
  */
 void FreeVmbusChannel(struct vmbus_channel *Channel)
@@ -130,7 +130,7 @@ void FreeVmbusChannel(struct vmbus_channel *Channel)
                              Channel);
 }

-/**
+/*
  * VmbusChannelProcessOffer - Process the offer by creating a channel/device associated with this offer
  */
 static void VmbusChannelProcessOffer(void *context)
@@ -212,7 +212,7 @@ static void VmbusChannelProcessOffer(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelProcessRescindOffer - Rescind the offer by initiating a device removal
  */
 static void VmbusChannelProcessRescindOffer(void *context)
@@ -224,7 +224,7 @@ static void VmbusChannelProcessRescindOffer(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOffer - Handler for channel offers from vmbus in parent partition.
  *
  * We ignore all offers except network and storage offers. For each network and
@@ -307,7 +307,7 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOfferRescind - Rescind offer handler.
  *
  * We queue a work item to process this offer synchronously
@@ -334,7 +334,7 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOffersDelivered - This is invoked when all offers have been delivered.
  *
  * Nothing to do here.
@@ -346,7 +346,7 @@ static void VmbusChannelOnOffersDelivered(
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOpenResult - Open result handler.
  *
  * This is invoked when we received a response to our channel open request.
@@ -394,7 +394,7 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnGpadlCreated - GPADL created handler.
  *
  * This is invoked when we received a response to our gpadl create request.
@@ -446,7 +446,7 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnGpadlTorndown - GPADL torndown handler.
  *
  * This is invoked when we received a response to our gpadl teardown request.
@@ -494,7 +494,7 @@ static void VmbusChannelOnGpadlTorndown(
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnVersionResponse - Version response handler
  *
  * This is invoked when we received a response to our initiate contact request.
@@ -557,7 +557,7 @@ static struct vmbus_channel_message_table_entry
        {ChannelMessageUnload,                  NULL},
 };

-/**
+/*
  * VmbusOnChannelMessage - Handler for channel protocol messages.
  *
  * This is invoked in the vmbus worker thread context.
@@ -596,7 +596,7 @@ void VmbusOnChannelMessage(void *Context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelRequestOffers - Send a request to get all our pending offers.
  */
 int VmbusChannelRequestOffers(void)
@@ -650,8 +650,9 @@ Cleanup:
        return ret;
 }

-/**
- * VmbusChannelReleaseUnattachedChannels - Release channels that are unattached/unconnected ie (no drivers associated)
+/*
+ * VmbusChannelReleaseUnattachedChannels - Release channels that are
+ * unattached/unconnected ie (no drivers associated)
  */
 void VmbusChannelReleaseUnattachedChannels(void)
 {
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 43c2e68..894aa37 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -33,7 +33,7 @@ struct VMBUS_CONNECTION gVmbusConnection = {
        .NextGpadlHandle        = ATOMIC_INIT(0xE1E10),
 };

-/**
+/*
  * VmbusConnect - Sends a connect request on the partition service connection
  */
 int VmbusConnect(void)
@@ -179,7 +179,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * VmbusDisconnect - Sends a disconnect request on the partition service connection
  */
 int VmbusDisconnect(void)
@@ -217,7 +217,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * GetChannelFromRelId - Get the channel object given its child relative id (ie channel id)
  */
 struct vmbus_channel *GetChannelFromRelId(u32 relId)
@@ -238,7 +238,7 @@ struct vmbus_channel *GetChannelFromRelId(u32 relId)
        return foundChannel;
 }

-/**
+/*
  * VmbusProcessChannelEvent - Process a channel event notification
  */
 static void VmbusProcessChannelEvent(void *context)
@@ -266,7 +266,7 @@ static void VmbusProcessChannelEvent(void *context)
        }
 }

-/**
+/*
  * VmbusOnEvents - Handler for events
  */
 void VmbusOnEvents(void)
@@ -307,7 +307,7 @@ void VmbusOnEvents(void)
        return;
 }

-/**
+/*
  * VmbusPostMessage - Send a msg on the vmbus's message connection
  */
 int VmbusPostMessage(void *buffer, size_t bufferLen)
@@ -319,7 +319,7 @@ int VmbusPostMessage(void *buffer, size_t bufferLen)
        return HvPostMessage(connId, 1, buffer, bufferLen);
 }

-/**
+/*
  * VmbusSetEvent - Send an event notification to the parent
  */
 int VmbusSetEvent(u32 childRelId)
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 51149e6..9bee568 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -34,7 +34,7 @@ struct hv_context gHvContext = {
        .SignalEventBuffer      = NULL,
 };

-/**
+/*
  * HvQueryHypervisorPresence - Query the cpuid for presense of windows hypervisor
  */
 static int HvQueryHypervisorPresence(void)
@@ -55,7 +55,7 @@ static int HvQueryHypervisorPresence(void)
        return ecx & HV_PRESENT_BIT;
 }

-/**
+/*
  * HvQueryHypervisorInfo - Get version info of the windows hypervisor
  */
 static int HvQueryHypervisorInfo(void)
@@ -124,7 +124,7 @@ static int HvQueryHypervisorInfo(void)
        return maxLeaf;
 }

-/**
+/*
  * HvDoHypercall - Invoke the specified hypercall
  */
 static u64 HvDoHypercall(u64 Control, void *Input, void *Output)
@@ -179,7 +179,7 @@ static u64 HvDoHypercall(u64 Control, void *Input, void *Output)
 #endif /* !x86_64 */
 }

-/**
+/*
  * HvInit - Main initialization routine.
  *
  * This routine must be called before any other routines in here are called
@@ -293,7 +293,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * HvCleanup - Cleanup routine.
  *
  * This routine is called normally during driver unloading or exiting.
@@ -320,7 +320,7 @@ void HvCleanup(void)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * HvPostMessage - Post a message using the hypervisor message IPC.
  *
  * This involves a hypercall.
@@ -361,7 +361,7 @@ u16 HvPostMessage(union hv_connection_id connectionId,
 }


-/**
+/*
  * HvSignalEvent - Signal an event on the specified connection using the hypervisor event IPC.
  *
  * This involves a hypercall.
@@ -375,7 +375,7 @@ u16 HvSignalEvent(void)
        return status;
 }

-/**
+/*
  * HvSynicInit - Initialize the Synthethic Interrupt Controller.
  *
  * If it is already initialized by another entity (ie x2v shim), we need to
@@ -481,7 +481,7 @@ Cleanup:
        return;
 }

-/**
+/*
  * HvSynicCleanup - Cleanup routine for HvSynicInit().
  */
 void HvSynicCleanup(void *arg)
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 1c717f9..bd739ac 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -166,7 +166,7 @@ static struct netvsc_device *ReleaseInboundNetDevice(struct hv_device *Device)
        return netDevice;
 }

-/**
+/*
  * NetVscInitialize - Main entry point
  */
 int NetVscInitialize(struct hv_driver *drv)
@@ -704,7 +704,7 @@ static void NetVscDisconnectFromVsp(struct netvsc_device *NetDevice)
        DPRINT_EXIT(NETVSC);
 }

-/**
+/*
  * NetVscOnDeviceAdd - Callback when the device belonging to this driver is added
  */
 static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
@@ -806,7 +806,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * NetVscOnDeviceRemove - Callback when the root bus device is removed
  */
 static int NetVscOnDeviceRemove(struct hv_device *Device)
@@ -863,7 +863,7 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
        return 0;
 }

-/**
+/*
  * NetVscOnCleanup - Perform any cleanup when the driver is removed
  */
 static void NetVscOnCleanup(struct hv_driver *drv)
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 38ea140..5a09d08 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -532,7 +532,7 @@ static int StorVscConnectToVsp(struct hv_device *Device)
        return ret;
 }

-/**
+/*
  * StorVscOnDeviceAdd - Callback when the device belonging to this driver is added
  */
 static int StorVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
@@ -584,7 +584,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * StorVscOnDeviceRemove - Callback when the our device is being removed
  */
 static int StorVscOnDeviceRemove(struct hv_device *Device)
@@ -682,7 +682,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * StorVscOnIORequest - Callback to initiate an I/O request
  */
 static int StorVscOnIORequest(struct hv_device *Device,
@@ -782,7 +782,7 @@ static int StorVscOnIORequest(struct hv_device *Device,
        return ret;
 }

-/**
+/*
  * StorVscOnCleanup - Perform any cleanup when the driver is removed
  */
 static void StorVscOnCleanup(struct hv_driver *Driver)
@@ -791,7 +791,7 @@ static void StorVscOnCleanup(struct hv_driver *Driver)
        DPRINT_EXIT(STORVSC);
 }

-/**
+/*
  * StorVscInitialize - Main entry point
  */
 int StorVscInitialize(struct hv_driver *Driver)
diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO
index dbfbde9..78d957e 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -1,6 +1,5 @@
 TODO:
        - fix remaining checkpatch warnings and errors
-       - use of /** when it is not a kerneldoc header
        - remove RingBuffer.c to us in-kernel ringbuffer functions instead.
        - audit the vmbus to verify it is working properly with the
          driver model
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 3d0a240..9a6a340 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -51,7 +51,7 @@ static const struct hv_guid gVmbusDeviceId = {
 static struct hv_driver *gDriver; /* vmbus driver object */
 static struct hv_device *gDevice; /* vmbus root device */

-/**
+/*
  * VmbusGetChannelOffers - Retrieve the channel offers from the parent partition
  */
 static void VmbusGetChannelOffers(void)
@@ -61,7 +61,7 @@ static void VmbusGetChannelOffers(void)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusGetChannelInterface - Get the channel interface
  */
 static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
@@ -69,7 +69,7 @@ static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
        GetChannelInterface(Interface);
 }

-/**
+/*
  * VmbusGetChannelInfo - Get the device info for the specified device object
  */
 static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
@@ -78,7 +78,7 @@ static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
        GetChannelInfo(DeviceObject, DeviceInfo);
 }

-/**
+/*
  * VmbusCreateChildDevice - Creates the child device on the bus that represents the channel offer
  */
 struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
@@ -91,7 +91,7 @@ struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
                                                Context);
 }

-/**
+/*
  * VmbusChildDeviceAdd - Registers the child device with the vmbus
  */
 int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
@@ -101,7 +101,7 @@ int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
        return vmbusDriver->OnChildDeviceAdd(gDevice, ChildDevice);
 }

-/**
+/*
  * VmbusChildDeviceRemove Unregisters the child device from the vmbus
  */
 void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
@@ -111,7 +111,7 @@ void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
        vmbusDriver->OnChildDeviceRemove(ChildDevice);
 }

-/**
+/*
  * VmbusOnDeviceAdd - Callback when the root bus device is added
  */
 static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
@@ -140,7 +140,7 @@ static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
        return ret;
 }

-/**
+/*
  * VmbusOnDeviceRemove - Callback when the root bus device is removed
  */
 static int VmbusOnDeviceRemove(struct hv_device *dev)
@@ -156,7 +156,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev)
        return ret;
 }

-/**
+/*
  * VmbusOnCleanup - Perform any cleanup when the driver is removed
  */
 static void VmbusOnCleanup(struct hv_driver *drv)
@@ -168,7 +168,7 @@ static void VmbusOnCleanup(struct hv_driver *drv)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusOnMsgDPC - DPC routine to handle messages from the hypervisior
  */
 static void VmbusOnMsgDPC(struct hv_driver *drv)
@@ -216,7 +216,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv)
        }
 }

-/**
+/*
  * VmbusOnEventDPC - DPC routine to handle events from the hypervisior
  */
 static void VmbusOnEventDPC(struct hv_driver *drv)
@@ -225,7 +225,7 @@ static void VmbusOnEventDPC(struct hv_driver *drv)
        VmbusOnEvents();
 }

-/**
+/*
  * VmbusOnISR - ISR routine
  */
 static int VmbusOnISR(struct hv_driver *drv)
@@ -263,7 +263,7 @@ static int VmbusOnISR(struct hv_driver *drv)
        return ret;
 }

-/**
+/*
  * VmbusInitialize - Main entry point
  */
 int VmbusInitialize(struct hv_driver *drv)
diff --git a/drivers/staging/hv/VmbusApi.h b/drivers/staging/hv/VmbusApi.h
index d089bb1..d2d04bc 100644
--- a/drivers/staging/hv/VmbusApi.h
+++ b/drivers/staging/hv/VmbusApi.h
@@ -84,6 +84,24 @@ struct hv_device_info {
        struct hv_dev_port_info Outbound;
 };

+/**
+ * struct vmbus_channel_interface - Contains member functions for vmbus channel
+ * @Open:      Open the channel
+ * @Close:     Close the channel
+ * @SendPacket:        Send a packet over the channel
+ * @SendPacketPageBuffer:      Send a single page buffer over the channel
+ * @SendPacketMultiPageBuffer: Send a multiple page buffers
+ * @RecvPacket:        Receive packet
+ * @RecvPacketRaw:     Receive Raw packet
+ * @EstablishGpadl:    Set up GPADL for ringbuffer
+ * @TeardownGpadl:     Teardown GPADL for ringbuffer
+ * @GetInfo:   Get info about the channel
+ *
+ * This structure contains function pointer to control vmbus channel
+ * behavior. None of these functions is externally callable, but they
+ * are used for normal vmbus channel internal behavior.
+ * Only used by Hyper-V drivers.
+ */
 struct vmbus_channel_interface {
        int (*Open)(struct hv_device *Device, u32 SendBufferSize,
                    u32 RecvRingBufferSize, void *UserData, u32 UserDataLen,
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index abeac12..c90a6aa 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -164,7 +164,7 @@ static struct block_device_operations block_ops = {
        .ioctl  = blkvsc_ioctl,
 };

-/**
+/*
  * blkvsc_drv_init -  BlkVsc driver initialization.
  */
 static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
@@ -244,7 +244,7 @@ static void blkvsc_drv_exit(void)
        return;
 }

-/**
+/*
  * blkvsc_probe - Add a new device for this driver
  */
 static int blkvsc_probe(struct device *device)
@@ -732,7 +732,7 @@ static int blkvsc_do_read_capacity16(struct block_device_context *blkdev)
        return 0;
 }

-/**
+/*
  * blkvsc_remove() - Callback when our device is removed
  */
 static int blkvsc_remove(struct device *device)
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 1af3dcb..8b188d4 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -265,7 +265,7 @@ retry_send:
        return ret;
 }

-/**
+/*
  * netvsc_linkstatus_callback - Link up/down notification
  */
 static void netvsc_linkstatus_callback(struct hv_device *device_obj,
@@ -292,8 +292,9 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
        DPRINT_EXIT(NETVSC_DRV);
 }

-/**
- * netvsc_recv_callback -  Callback when we receive a packet from the "wire" on the specified device.
+/*
+ * netvsc_recv_callback -  Callback when we receive a packet from the
+ * "wire" on the specified device.
  */
 static int netvsc_recv_callback(struct hv_device *device_obj,
                                struct hv_netvsc_packet *packet)
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 3a4793a..6b785e6 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -58,6 +58,15 @@ void *osd_VirtualAllocExec(unsigned int size)
 #endif
 }

+/**
+ * osd_PageAlloc() - Allocate pages
+ * @count:      Total number of Kernel pages you want to allocate
+ *
+ * Tries to allocate @count number of consecutive free kernel pages.
+ * And if successful, it will set the pages to 0 before returning.
+ * If successfull it will return pointer to the @count pages.
+ * Mainly used by Hyper-V drivers.
+ */
 void *osd_PageAlloc(unsigned int count)
 {
        void *p;
@@ -77,6 +86,14 @@ void *osd_PageAlloc(unsigned int count)
 }
 EXPORT_SYMBOL_GPL(osd_PageAlloc);

+/**
+ * osd_PageFree() - Free pages
+ * @page:       Pointer to the first page to be freed
+ * @count:      Total number of Kernel pages you free
+ *
+ * Frees the pages allocated by osd_PageAlloc()
+ * Mainly used by Hyper-V drivers.
+ */
 void osd_PageFree(void *page, unsigned int count)
 {
        free_pages((unsigned long)page, get_order(count * PAGE_SIZE));
@@ -85,6 +102,17 @@ void osd_PageFree(void *page, unsigned int count)
 }
 EXPORT_SYMBOL_GPL(osd_PageFree);

+/**
+ * osd_WaitEventCreate() - Create the event queue
+ *
+ * Allocates memory for a &struct osd_waitevent. And then calls
+ * init_waitqueue_head to set up the wait queue for the event.
+ * This structure is usually part of a another structure that contains
+ * the actual Hyper-V device driver structure.
+ *
+ * Returns pointer to &struct osd_waitevent
+ * Mainly used by Hyper-V drivers.
+ */
 struct osd_waitevent *osd_WaitEventCreate(void)
 {
        struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent),
@@ -98,6 +126,19 @@ struct osd_waitevent *osd_WaitEventCreate(void)
 }
 EXPORT_SYMBOL_GPL(osd_WaitEventCreate);

+
+/**
+ * osd_WaitEventSet() - Wake up the process
+ * @waitEvent: Structure to event to be woken up
+ *
+ * @waitevent is of type &struct osd_waitevent
+ *
+ * Wake up the sleeping process so it can do some work.
+ * And set condition indicator in &struct osd_waitevent to indicate
+ * the process is in a woken state.
+ *
+ * Only used by Network and Storage Hyper-V drivers.
+ */
 void osd_WaitEventSet(struct osd_waitevent *waitEvent)
 {
        waitEvent->condition = 1;
@@ -105,6 +146,20 @@ void osd_WaitEventSet(struct osd_waitevent *waitEvent)
 }
 EXPORT_SYMBOL_GPL(osd_WaitEventSet);

+/**
+ * osd_WaitEventWait() - Wait for event till condition is true
+ * @waitEvent: Structure to event to be put to sleep
+ *
+ * @waitevent is of type &struct osd_waitevent
+ *
+ * Set up the process to sleep until waitEvent->condition get true.
+ * And set condition indicator in &struct osd_waitevent to indicate
+ * the process is in a sleeping state.
+ *
+ * Returns the status of 'wait_event_interruptible()' system call
+ *
+ * Mainly used by Hyper-V drivers.
+ */
 int osd_WaitEventWait(struct osd_waitevent *waitEvent)
 {
        int ret = 0;
@@ -116,6 +171,21 @@ int osd_WaitEventWait(struct osd_waitevent *waitEvent)
 }
 EXPORT_SYMBOL_GPL(osd_WaitEventWait);

+/**
+ * osd_WaitEventWaitEx() - Wait for event or timeout for process wakeup
+ * @waitEvent: Structure to event to be put to sleep
+ * @TimeoutInMs:       Total number of Milliseconds to wait before waking up
+ *
+ * @waitevent is of type &struct osd_waitevent
+ * Set up the process to sleep until @waitEvent->condition get true or
+ * @TimeoutInMs (Time out in Milliseconds) has been reached.
+ * And set condition indicator in &struct osd_waitevent to indicate
+ * the process is in a sleeping state.
+ *
+ * Returns the status of 'wait_event_interruptible_timeout()' system call
+ *
+ * Mainly used by Hyper-V drivers.
+ */
 int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs)
 {
        int ret = 0;
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 3988f4b..7676ba5 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -129,7 +129,7 @@ static struct scsi_host_template scsi_driver = {
 };


-/**
+/*
  * storvsc_drv_init - StorVsc driver initialization.
  */
 static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
@@ -222,7 +222,7 @@ static void storvsc_drv_exit(void)
        return;
 }

-/**
+/*
  * storvsc_probe - Add a new device for this driver
  */
 static int storvsc_probe(struct device *device)
@@ -318,7 +318,7 @@ static int storvsc_probe(struct device *device)
        return ret;
 }

-/**
+/*
  * storvsc_remove - Callback when our device is removed
  */
 static int storvsc_remove(struct device *device)
@@ -371,7 +371,7 @@ static int storvsc_remove(struct device *device)
        return ret;
 }

-/**
+/*
  * storvsc_commmand_completion - Command completion processing
  */
 static void storvsc_commmand_completion(struct hv_storvsc_request *request)
@@ -622,7 +622,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
        return total_copied;
 }

-/**
+/*
  * storvsc_queuecommand - Initiate command processing
  */
 static int storvsc_queuecommand(struct scsi_cmnd *scmnd,
@@ -823,7 +823,7 @@ static int storvsc_merge_bvec(struct request_queue *q,
        return bvec->bv_len;
 }

-/**
+/*
  * storvsc_device_configure - Configure the specified scsi device
  */
 static int storvsc_device_alloc(struct scsi_device *sdevice)
@@ -862,7 +862,7 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
        return 0;
 }

-/**
+/*
  * storvsc_host_reset_handler - Reset the scsi HBA
  */
 static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 2c90619..177f565 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -128,7 +128,7 @@ static struct vmbus_driver_context g_vmbus_drv = {
        .bus.dev_attrs =        vmbus_device_attrs,
 };

-/**
+/*
  * vmbus_show_device_attr - Show the device attribute in sysfs.
  *
  * This is invoked when user does a
@@ -232,7 +232,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
        }
 }

-/**
+/*
  * vmbus_bus_init -Main vmbus driver initialization routine.
  *
  * Here, we
@@ -361,7 +361,7 @@ cleanup:
        return ret;
 }

-/**
+/*
  * vmbus_bus_exit - Terminate the vmbus driver.
  *
  * This routine is opposite of vmbus_bus_init()
@@ -397,8 +397,18 @@ static void vmbus_bus_exit(void)
        return;
 }

+
 /**
- * vmbus_child_driver_register - Register a vmbus's child driver
+ * vmbus_child_driver_register() - Register a vmbus's child driver
+ * @driver_ctx:        Pointer to driver structure you want to register
+ *
+ * @driver_ctx is of type &struct driver_context
+ *
+ * Registers the given driver with Linux through the 'driver_register()' call
+ * And sets up the hyper-v vmbus handling for this driver.
+ * It will return the state of the 'driver_register()' call.
+ *
+ * Mainly used by Hyper-V drivers.
  */
 int vmbus_child_driver_register(struct driver_context *driver_ctx)
 {
@@ -424,7 +434,15 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx)
 EXPORT_SYMBOL(vmbus_child_driver_register);

 /**
- * vmbus_child_driver_unregister Unregister a vmbus's child driver
+ * vmbus_child_driver_unregister() - Unregister a vmbus's child driver
+ * @driver_ctx:        Pointer to driver structure you want to un-register
+ *
+ * @driver_ctx is of type &struct driver_context
+ *
+ * Un-register the given driver with Linux through the 'driver_unregister()'
+ * call. And ungegisters the driver from the Hyper-V vmbus handler.
+ *
+ * Mainly used by Hyper-V drivers.
  */
 void vmbus_child_driver_unregister(struct driver_context *driver_ctx)
 {
@@ -442,9 +460,15 @@ void vmbus_child_driver_unregister(struct driver_context *driver_ctx)
 EXPORT_SYMBOL(vmbus_child_driver_unregister);

 /**
- * vmbus_get_interface - Get the vmbus channel interface.
+ * vmbus_get_interface() - Get the vmbus channel interface.
+ * @interface: Pointer to channel interface structure
+ *
+ * Get the Hyper-V channel used for the driver.
+ *
+ * @interface is of type &struct vmbus_channel_interface
+ * This is invoked by child/client driver that sits above vmbus.
  *
- * This is invoked by child/client driver that sits above vmbus
+ * Mainly used by Hyper-V drivers.
  */
 void vmbus_get_interface(struct vmbus_channel_interface *interface)
 {
@@ -454,7 +478,7 @@ void vmbus_get_interface(struct vmbus_channel_interface *interface)
 }
 EXPORT_SYMBOL(vmbus_get_interface);

-/**
+/*
  * vmbus_child_device_get_info - Get the vmbus child device info.
  *
  * This is invoked to display various device attributes in sysfs.
@@ -467,8 +491,9 @@ static void vmbus_child_device_get_info(struct hv_device *device_obj,
        vmbus_drv_obj->GetChannelInfo(device_obj, device_info);
 }

-/**
- * vmbus_child_device_create - Creates and registers a new child device on the vmbus.
+/*
+ * vmbus_child_device_create - Creates and registers a new child device
+ * on the vmbus.
  */
 static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
                                                   struct hv_guid *instance,
@@ -522,7 +547,7 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
        return child_device_obj;
 }

-/**
+/*
  * vmbus_child_device_register - Register the child device on the specified bus
  */
 static int vmbus_child_device_register(struct hv_device *root_device_obj,
@@ -570,8 +595,9 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
        return ret;
 }

-/**
- * vmbus_child_device_unregister - Remove the specified child device from the vmbus.
+/*
+ * vmbus_child_device_unregister - Remove the specified child device
+ * from the vmbus.
  */
 static void vmbus_child_device_unregister(struct hv_device *device_obj)
 {
@@ -594,7 +620,7 @@ static void vmbus_child_device_unregister(struct hv_device *device_obj)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_child_device_destroy - Destroy the specified child device on the vmbus.
  */
 static void vmbus_child_device_destroy(struct hv_device *device_obj)
@@ -604,7 +630,7 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_uevent - add uevent for our device
  *
  * This routine is invoked when a device is added or removed on the vmbus to
@@ -683,7 +709,7 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
        return 0;
 }

-/**
+/*
  * vmbus_match - Attempt to match the specified device to the specified driver
  */
 static int vmbus_match(struct device *device, struct device_driver *driver)
@@ -718,7 +744,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
        return match;
 }

-/**
+/*
  * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
  *
  * We need a callback because we cannot invoked device_unregister() inside
@@ -741,7 +767,7 @@ static void vmbus_probe_failed_cb(struct work_struct *context)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_probe - Add the new vmbus's child device
  */
 static int vmbus_probe(struct device *child_device)
@@ -777,7 +803,7 @@ static int vmbus_probe(struct device *child_device)
        return ret;
 }

-/**
+/*
  * vmbus_remove - Remove a vmbus device
  */
 static int vmbus_remove(struct device *child_device)
@@ -819,7 +845,7 @@ static int vmbus_remove(struct device *child_device)
        return 0;
 }

-/**
+/*
  * vmbus_shutdown - Shutdown a vmbus device
  */
 static void vmbus_shutdown(struct device *child_device)
@@ -855,7 +881,7 @@ static void vmbus_shutdown(struct device *child_device)
        return;
 }

-/**
+/*
  * vmbus_bus_release - Final callback release of the vmbus root device
  */
 static void vmbus_bus_release(struct device *device)
@@ -869,7 +895,7 @@ static void vmbus_bus_release(struct device *device)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_device_release - Final callback release of the vmbus child device
  */
 static void vmbus_device_release(struct device *device)
@@ -887,7 +913,7 @@ static void vmbus_device_release(struct device *device)
        return;
 }

-/**
+/*
  * vmbus_msg_dpc - Tasklet routine to handle hypervisor messages
  */
 static void vmbus_msg_dpc(unsigned long data)
@@ -904,7 +930,7 @@ static void vmbus_msg_dpc(unsigned long data)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_msg_dpc - Tasklet routine to handle hypervisor events
  */
 static void vmbus_event_dpc(unsigned long data)

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED
@ 2010-03-04 22:11   ` Hank Janssen
  0 siblings, 0 replies; 16+ messages in thread
From: Hank Janssen @ 2010-03-04 22:11 UTC (permalink / raw)
  To: Hank Janssen, 'linux-kernel@vger.kernel.org', devel
  Cc: joe, Greg KH, Haiyang Zhang, Hashir Abdi


From: Hank Janssen <hjanssen@microsoft.com>

Removed kerneldoc /** from functions that should not have them.
Added proper kerneldoc headers to functions that should have them.

This includes fixes as pointed out by Randy Dunlap and Joe Perches.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Joe Perches <joe@perches.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>


---
 drivers/staging/hv/Channel.c     |   49 ++++++++++++++-----------
 drivers/staging/hv/ChannelMgmt.c |   33 +++++++++--------
 drivers/staging/hv/Connection.c  |   14 ++++----
 drivers/staging/hv/Hv.c          |   18 +++++-----
 drivers/staging/hv/NetVsc.c      |    8 ++--
 drivers/staging/hv/StorVsc.c     |   10 +++---
 drivers/staging/hv/TODO          |    1 -
 drivers/staging/hv/Vmbus.c       |   26 +++++++-------
 drivers/staging/hv/VmbusApi.h    |   18 +++++++++
 drivers/staging/hv/blkvsc_drv.c  |    6 ++--
 drivers/staging/hv/netvsc_drv.c  |    7 ++--
 drivers/staging/hv/osd.c         |   70 +++++++++++++++++++++++++++++++++++
 drivers/staging/hv/storvsc_drv.c |   14 ++++----
 drivers/staging/hv/vmbus_drv.c   |   74 +++++++++++++++++++++++++------------
 14 files changed, 234 insertions(+), 114 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index d46eb14..1fc2710 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -64,8 +64,9 @@ static void DumpMonitorPage(struct hv_monitor_page *MonitorPage)
 }
 #endif

-/**
- * VmbusChannelSetEvent - Trigger an event notification on the specified channel.
+/*
+ * VmbusChannelSetEvent - Trigger an event notification on the specified
+ * channel.
  */
 static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 {
@@ -119,7 +120,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
 }

 #endif
-/**
+/*
  * VmbusChannelGetDebugInfo -Retrieve various channel debug info
  */
 void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
@@ -164,7 +165,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
        RingBufferGetDebugInfo(&Channel->Outbound, &DebugInfo->Outbound);
 }

-/**
+/*
  * VmbusChannelOpen - Open the specified channel.
  */
 int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
@@ -282,8 +283,9 @@ Cleanup:
        return 0;
 }

-/**
- * DumpGpadlBody - Dump the gpadl body message to the console for debugging purposes.
+/*
+ * DumpGpadlBody - Dump the gpadl body message to the console for
+ * debugging purposes.
  */
 static void DumpGpadlBody(struct vmbus_channel_gpadl_body *Gpadl, u32 Len)
 {
@@ -299,8 +301,9 @@ static void DumpGpadlBody(struct vmbus_channel_gpadl_body *Gpadl, u32 Len)
                           i, Gpadl->Pfn[i]);
 }

-/**
- * DumpGpadlHeader - Dump the gpadl header message to the console for debugging purposes.
+/*
+ * DumpGpadlHeader - Dump the gpadl header message to the console for
+ * debugging purposes.
  */
 static void DumpGpadlHeader(struct vmbus_channel_gpadl_header *Gpadl)
 {
@@ -324,7 +327,7 @@ static void DumpGpadlHeader(struct vmbus_channel_gpadl_header *Gpadl)
        }
 }

-/**
+/*
  * VmbusChannelCreateGpadlHeader - Creates a gpadl for the specified buffer
  */
 static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
@@ -440,7 +443,7 @@ static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
        return 0;
 }

-/**
+/*
  * VmbusChannelEstablishGpadl - Estabish a GPADL for the specified buffer
  *
  * @Channel: a channel
@@ -544,7 +547,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * VmbusChannelTeardownGpadl -Teardown the specified GPADL handle
  */
 int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
@@ -597,7 +600,7 @@ int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
        return ret;
 }

-/**
+/*
  * VmbusChannelClose - Close the specified channel
  */
 void VmbusChannelClose(struct vmbus_channel *Channel)
@@ -662,7 +665,7 @@ void VmbusChannelClose(struct vmbus_channel *Channel)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelSendPacket - Send the specified buffer on the given channel
  */
 int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer,
@@ -708,8 +711,9 @@ int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer,
        return ret;
 }

-/**
- * VmbusChannelSendPacketPageBuffer - Send a range of single-page buffer packets using a GPADL Direct packet type.
+/*
+ * VmbusChannelSendPacketPageBuffer - Send a range of single-page buffer
+ * packets using a GPADL Direct packet type.
  */
 int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
                                     struct hv_page_buffer PageBuffers[],
@@ -773,8 +777,9 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
        return ret;
 }

-/**
- * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer packet using a GPADL Direct packet type.
+/*
+ * VmbusChannelSendPacketMultiPageBuffer - Send a multi-page buffer packet
+ * using a GPADL Direct packet type.
  */
 int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
                                struct hv_multipage_buffer *MultiPageBuffer,
@@ -842,7 +847,7 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
        return ret;
 }

-/**
+/*
  * VmbusChannelRecvPacket - Retrieve the user packet on the specified channel
  */
 /* TODO: Do we ever receive a gpa direct packet other than the ones we send ? */
@@ -908,7 +913,7 @@ int VmbusChannelRecvPacket(struct vmbus_channel *Channel, void *Buffer,
        return 0;
 }

-/**
+/*
  * VmbusChannelRecvPacketRaw - Retrieve the raw packet on the specified channel
  */
 int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer,
@@ -971,7 +976,7 @@ int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer,
        return 0;
 }

-/**
+/*
  * VmbusChannelOnChannelEvent - Channel event callback
  */
 void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
@@ -984,7 +989,7 @@ void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
        mod_timer(&Channel->poll_timer, jiffies + usecs_to_jiffies(100));
 }

-/**
+/*
  * VmbusChannelOnTimer - Timer event callback
  */
 void VmbusChannelOnTimer(unsigned long data)
@@ -995,7 +1000,7 @@ void VmbusChannelOnTimer(unsigned long data)
                channel->OnChannelCallback(channel->ChannelCallbackContext);
 }

-/**
+/*
  * DumpVmbusChannel - Dump vmbus channel info to the console
  */
 static void DumpVmbusChannel(struct vmbus_channel *Channel)
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index ef38467..cc4b93c 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -70,7 +70,7 @@ static const struct hv_guid
        },
 };

-/**
+/*
  * AllocVmbusChannel - Allocate and initialize a vmbus channel object
  */
 struct vmbus_channel *AllocVmbusChannel(void)
@@ -96,7 +96,7 @@ struct vmbus_channel *AllocVmbusChannel(void)
        return channel;
 }

-/**
+/*
  * ReleaseVmbusChannel - Release the vmbus channel object itself
  */
 static inline void ReleaseVmbusChannel(void *context)
@@ -114,7 +114,7 @@ static inline void ReleaseVmbusChannel(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * FreeVmbusChannel - Release the resources used by the vmbus channel object
  */
 void FreeVmbusChannel(struct vmbus_channel *Channel)
@@ -130,7 +130,7 @@ void FreeVmbusChannel(struct vmbus_channel *Channel)
                              Channel);
 }

-/**
+/*
  * VmbusChannelProcessOffer - Process the offer by creating a channel/device associated with this offer
  */
 static void VmbusChannelProcessOffer(void *context)
@@ -212,7 +212,7 @@ static void VmbusChannelProcessOffer(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelProcessRescindOffer - Rescind the offer by initiating a device removal
  */
 static void VmbusChannelProcessRescindOffer(void *context)
@@ -224,7 +224,7 @@ static void VmbusChannelProcessRescindOffer(void *context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOffer - Handler for channel offers from vmbus in parent partition.
  *
  * We ignore all offers except network and storage offers. For each network and
@@ -307,7 +307,7 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOfferRescind - Rescind offer handler.
  *
  * We queue a work item to process this offer synchronously
@@ -334,7 +334,7 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOffersDelivered - This is invoked when all offers have been delivered.
  *
  * Nothing to do here.
@@ -346,7 +346,7 @@ static void VmbusChannelOnOffersDelivered(
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnOpenResult - Open result handler.
  *
  * This is invoked when we received a response to our channel open request.
@@ -394,7 +394,7 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnGpadlCreated - GPADL created handler.
  *
  * This is invoked when we received a response to our gpadl create request.
@@ -446,7 +446,7 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnGpadlTorndown - GPADL torndown handler.
  *
  * This is invoked when we received a response to our gpadl teardown request.
@@ -494,7 +494,7 @@ static void VmbusChannelOnGpadlTorndown(
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelOnVersionResponse - Version response handler
  *
  * This is invoked when we received a response to our initiate contact request.
@@ -557,7 +557,7 @@ static struct vmbus_channel_message_table_entry
        {ChannelMessageUnload,                  NULL},
 };

-/**
+/*
  * VmbusOnChannelMessage - Handler for channel protocol messages.
  *
  * This is invoked in the vmbus worker thread context.
@@ -596,7 +596,7 @@ void VmbusOnChannelMessage(void *Context)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusChannelRequestOffers - Send a request to get all our pending offers.
  */
 int VmbusChannelRequestOffers(void)
@@ -650,8 +650,9 @@ Cleanup:
        return ret;
 }

-/**
- * VmbusChannelReleaseUnattachedChannels - Release channels that are unattached/unconnected ie (no drivers associated)
+/*
+ * VmbusChannelReleaseUnattachedChannels - Release channels that are
+ * unattached/unconnected ie (no drivers associated)
  */
 void VmbusChannelReleaseUnattachedChannels(void)
 {
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 43c2e68..894aa37 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -33,7 +33,7 @@ struct VMBUS_CONNECTION gVmbusConnection = {
        .NextGpadlHandle        = ATOMIC_INIT(0xE1E10),
 };

-/**
+/*
  * VmbusConnect - Sends a connect request on the partition service connection
  */
 int VmbusConnect(void)
@@ -179,7 +179,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * VmbusDisconnect - Sends a disconnect request on the partition service connection
  */
 int VmbusDisconnect(void)
@@ -217,7 +217,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * GetChannelFromRelId - Get the channel object given its child relative id (ie channel id)
  */
 struct vmbus_channel *GetChannelFromRelId(u32 relId)
@@ -238,7 +238,7 @@ struct vmbus_channel *GetChannelFromRelId(u32 relId)
        return foundChannel;
 }

-/**
+/*
  * VmbusProcessChannelEvent - Process a channel event notification
  */
 static void VmbusProcessChannelEvent(void *context)
@@ -266,7 +266,7 @@ static void VmbusProcessChannelEvent(void *context)
        }
 }

-/**
+/*
  * VmbusOnEvents - Handler for events
  */
 void VmbusOnEvents(void)
@@ -307,7 +307,7 @@ void VmbusOnEvents(void)
        return;
 }

-/**
+/*
  * VmbusPostMessage - Send a msg on the vmbus's message connection
  */
 int VmbusPostMessage(void *buffer, size_t bufferLen)
@@ -319,7 +319,7 @@ int VmbusPostMessage(void *buffer, size_t bufferLen)
        return HvPostMessage(connId, 1, buffer, bufferLen);
 }

-/**
+/*
  * VmbusSetEvent - Send an event notification to the parent
  */
 int VmbusSetEvent(u32 childRelId)
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 51149e6..9bee568 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -34,7 +34,7 @@ struct hv_context gHvContext = {
        .SignalEventBuffer      = NULL,
 };

-/**
+/*
  * HvQueryHypervisorPresence - Query the cpuid for presense of windows hypervisor
  */
 static int HvQueryHypervisorPresence(void)
@@ -55,7 +55,7 @@ static int HvQueryHypervisorPresence(void)
        return ecx & HV_PRESENT_BIT;
 }

-/**
+/*
  * HvQueryHypervisorInfo - Get version info of the windows hypervisor
  */
 static int HvQueryHypervisorInfo(void)
@@ -124,7 +124,7 @@ static int HvQueryHypervisorInfo(void)
        return maxLeaf;
 }

-/**
+/*
  * HvDoHypercall - Invoke the specified hypercall
  */
 static u64 HvDoHypercall(u64 Control, void *Input, void *Output)
@@ -179,7 +179,7 @@ static u64 HvDoHypercall(u64 Control, void *Input, void *Output)
 #endif /* !x86_64 */
 }

-/**
+/*
  * HvInit - Main initialization routine.
  *
  * This routine must be called before any other routines in here are called
@@ -293,7 +293,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * HvCleanup - Cleanup routine.
  *
  * This routine is called normally during driver unloading or exiting.
@@ -320,7 +320,7 @@ void HvCleanup(void)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * HvPostMessage - Post a message using the hypervisor message IPC.
  *
  * This involves a hypercall.
@@ -361,7 +361,7 @@ u16 HvPostMessage(union hv_connection_id connectionId,
 }


-/**
+/*
  * HvSignalEvent - Signal an event on the specified connection using the hypervisor event IPC.
  *
  * This involves a hypercall.
@@ -375,7 +375,7 @@ u16 HvSignalEvent(void)
        return status;
 }

-/**
+/*
  * HvSynicInit - Initialize the Synthethic Interrupt Controller.
  *
  * If it is already initialized by another entity (ie x2v shim), we need to
@@ -481,7 +481,7 @@ Cleanup:
        return;
 }

-/**
+/*
  * HvSynicCleanup - Cleanup routine for HvSynicInit().
  */
 void HvSynicCleanup(void *arg)
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 1c717f9..bd739ac 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -166,7 +166,7 @@ static struct netvsc_device *ReleaseInboundNetDevice(struct hv_device *Device)
        return netDevice;
 }

-/**
+/*
  * NetVscInitialize - Main entry point
  */
 int NetVscInitialize(struct hv_driver *drv)
@@ -704,7 +704,7 @@ static void NetVscDisconnectFromVsp(struct netvsc_device *NetDevice)
        DPRINT_EXIT(NETVSC);
 }

-/**
+/*
  * NetVscOnDeviceAdd - Callback when the device belonging to this driver is added
  */
 static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
@@ -806,7 +806,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * NetVscOnDeviceRemove - Callback when the root bus device is removed
  */
 static int NetVscOnDeviceRemove(struct hv_device *Device)
@@ -863,7 +863,7 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
        return 0;
 }

-/**
+/*
  * NetVscOnCleanup - Perform any cleanup when the driver is removed
  */
 static void NetVscOnCleanup(struct hv_driver *drv)
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 38ea140..5a09d08 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -532,7 +532,7 @@ static int StorVscConnectToVsp(struct hv_device *Device)
        return ret;
 }

-/**
+/*
  * StorVscOnDeviceAdd - Callback when the device belonging to this driver is added
  */
 static int StorVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
@@ -584,7 +584,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * StorVscOnDeviceRemove - Callback when the our device is being removed
  */
 static int StorVscOnDeviceRemove(struct hv_device *Device)
@@ -682,7 +682,7 @@ Cleanup:
        return ret;
 }

-/**
+/*
  * StorVscOnIORequest - Callback to initiate an I/O request
  */
 static int StorVscOnIORequest(struct hv_device *Device,
@@ -782,7 +782,7 @@ static int StorVscOnIORequest(struct hv_device *Device,
        return ret;
 }

-/**
+/*
  * StorVscOnCleanup - Perform any cleanup when the driver is removed
  */
 static void StorVscOnCleanup(struct hv_driver *Driver)
@@ -791,7 +791,7 @@ static void StorVscOnCleanup(struct hv_driver *Driver)
        DPRINT_EXIT(STORVSC);
 }

-/**
+/*
  * StorVscInitialize - Main entry point
  */
 int StorVscInitialize(struct hv_driver *Driver)
diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO
index dbfbde9..78d957e 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -1,6 +1,5 @@
 TODO:
        - fix remaining checkpatch warnings and errors
-       - use of /** when it is not a kerneldoc header
        - remove RingBuffer.c to us in-kernel ringbuffer functions instead.
        - audit the vmbus to verify it is working properly with the
          driver model
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 3d0a240..9a6a340 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -51,7 +51,7 @@ static const struct hv_guid gVmbusDeviceId = {
 static struct hv_driver *gDriver; /* vmbus driver object */
 static struct hv_device *gDevice; /* vmbus root device */

-/**
+/*
  * VmbusGetChannelOffers - Retrieve the channel offers from the parent partition
  */
 static void VmbusGetChannelOffers(void)
@@ -61,7 +61,7 @@ static void VmbusGetChannelOffers(void)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusGetChannelInterface - Get the channel interface
  */
 static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
@@ -69,7 +69,7 @@ static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
        GetChannelInterface(Interface);
 }

-/**
+/*
  * VmbusGetChannelInfo - Get the device info for the specified device object
  */
 static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
@@ -78,7 +78,7 @@ static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
        GetChannelInfo(DeviceObject, DeviceInfo);
 }

-/**
+/*
  * VmbusCreateChildDevice - Creates the child device on the bus that represents the channel offer
  */
 struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
@@ -91,7 +91,7 @@ struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
                                                Context);
 }

-/**
+/*
  * VmbusChildDeviceAdd - Registers the child device with the vmbus
  */
 int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
@@ -101,7 +101,7 @@ int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
        return vmbusDriver->OnChildDeviceAdd(gDevice, ChildDevice);
 }

-/**
+/*
  * VmbusChildDeviceRemove Unregisters the child device from the vmbus
  */
 void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
@@ -111,7 +111,7 @@ void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
        vmbusDriver->OnChildDeviceRemove(ChildDevice);
 }

-/**
+/*
  * VmbusOnDeviceAdd - Callback when the root bus device is added
  */
 static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
@@ -140,7 +140,7 @@ static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
        return ret;
 }

-/**
+/*
  * VmbusOnDeviceRemove - Callback when the root bus device is removed
  */
 static int VmbusOnDeviceRemove(struct hv_device *dev)
@@ -156,7 +156,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev)
        return ret;
 }

-/**
+/*
  * VmbusOnCleanup - Perform any cleanup when the driver is removed
  */
 static void VmbusOnCleanup(struct hv_driver *drv)
@@ -168,7 +168,7 @@ static void VmbusOnCleanup(struct hv_driver *drv)
        DPRINT_EXIT(VMBUS);
 }

-/**
+/*
  * VmbusOnMsgDPC - DPC routine to handle messages from the hypervisior
  */
 static void VmbusOnMsgDPC(struct hv_driver *drv)
@@ -216,7 +216,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv)
        }
 }

-/**
+/*
  * VmbusOnEventDPC - DPC routine to handle events from the hypervisior
  */
 static void VmbusOnEventDPC(struct hv_driver *drv)
@@ -225,7 +225,7 @@ static void VmbusOnEventDPC(struct hv_driver *drv)
        VmbusOnEvents();
 }

-/**
+/*
  * VmbusOnISR - ISR routine
  */
 static int VmbusOnISR(struct hv_driver *drv)
@@ -263,7 +263,7 @@ static int VmbusOnISR(struct hv_driver *drv)
        return ret;
 }

-/**
+/*
  * VmbusInitialize - Main entry point
  */
 int VmbusInitialize(struct hv_driver *drv)
diff --git a/drivers/staging/hv/VmbusApi.h b/drivers/staging/hv/VmbusApi.h
index d089bb1..d2d04bc 100644
--- a/drivers/staging/hv/VmbusApi.h
+++ b/drivers/staging/hv/VmbusApi.h
@@ -84,6 +84,24 @@ struct hv_device_info {
        struct hv_dev_port_info Outbound;
 };

+/**
+ * struct vmbus_channel_interface - Contains member functions for vmbus channel
+ * @Open:      Open the channel
+ * @Close:     Close the channel
+ * @SendPacket:        Send a packet over the channel
+ * @SendPacketPageBuffer:      Send a single page buffer over the channel
+ * @SendPacketMultiPageBuffer: Send a multiple page buffers
+ * @RecvPacket:        Receive packet
+ * @RecvPacketRaw:     Receive Raw packet
+ * @EstablishGpadl:    Set up GPADL for ringbuffer
+ * @TeardownGpadl:     Teardown GPADL for ringbuffer
+ * @GetInfo:   Get info about the channel
+ *
+ * This structure contains function pointer to control vmbus channel
+ * behavior. None of these functions is externally callable, but they
+ * are used for normal vmbus channel internal behavior.
+ * Only used by Hyper-V drivers.
+ */
 struct vmbus_channel_interface {
        int (*Open)(struct hv_device *Device, u32 SendBufferSize,
                    u32 RecvRingBufferSize, void *UserData, u32 UserDataLen,
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index abeac12..c90a6aa 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -164,7 +164,7 @@ static struct block_device_operations block_ops = {
        .ioctl  = blkvsc_ioctl,
 };

-/**
+/*
  * blkvsc_drv_init -  BlkVsc driver initialization.
  */
 static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
@@ -244,7 +244,7 @@ static void blkvsc_drv_exit(void)
        return;
 }

-/**
+/*
  * blkvsc_probe - Add a new device for this driver
  */
 static int blkvsc_probe(struct device *device)
@@ -732,7 +732,7 @@ static int blkvsc_do_read_capacity16(struct block_device_context *blkdev)
        return 0;
 }

-/**
+/*
  * blkvsc_remove() - Callback when our device is removed
  */
 static int blkvsc_remove(struct device *device)
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 1af3dcb..8b188d4 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -265,7 +265,7 @@ retry_send:
        return ret;
 }

-/**
+/*
  * netvsc_linkstatus_callback - Link up/down notification
  */
 static void netvsc_linkstatus_callback(struct hv_device *device_obj,
@@ -292,8 +292,9 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
        DPRINT_EXIT(NETVSC_DRV);
 }

-/**
- * netvsc_recv_callback -  Callback when we receive a packet from the "wire" on the specified device.
+/*
+ * netvsc_recv_callback -  Callback when we receive a packet from the
+ * "wire" on the specified device.
  */
 static int netvsc_recv_callback(struct hv_device *device_obj,
                                struct hv_netvsc_packet *packet)
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 3a4793a..6b785e6 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -58,6 +58,15 @@ void *osd_VirtualAllocExec(unsigned int size)
 #endif
 }

+/**
+ * osd_PageAlloc() - Allocate pages
+ * @count:      Total number of Kernel pages you want to allocate
+ *
+ * Tries to allocate @count number of consecutive free kernel pages.
+ * And if successful, it will set the pages to 0 before returning.
+ * If successfull it will return pointer to the @count pages.
+ * Mainly used by Hyper-V drivers.
+ */
 void *osd_PageAlloc(unsigned int count)
 {
        void *p;
@@ -77,6 +86,14 @@ void *osd_PageAlloc(unsigned int count)
 }
 EXPORT_SYMBOL_GPL(osd_PageAlloc);

+/**
+ * osd_PageFree() - Free pages
+ * @page:       Pointer to the first page to be freed
+ * @count:      Total number of Kernel pages you free
+ *
+ * Frees the pages allocated by osd_PageAlloc()
+ * Mainly used by Hyper-V drivers.
+ */
 void osd_PageFree(void *page, unsigned int count)
 {
        free_pages((unsigned long)page, get_order(count * PAGE_SIZE));
@@ -85,6 +102,17 @@ void osd_PageFree(void *page, unsigned int count)
 }
 EXPORT_SYMBOL_GPL(osd_PageFree);

+/**
+ * osd_WaitEventCreate() - Create the event queue
+ *
+ * Allocates memory for a &struct osd_waitevent. And then calls
+ * init_waitqueue_head to set up the wait queue for the event.
+ * This structure is usually part of a another structure that contains
+ * the actual Hyper-V device driver structure.
+ *
+ * Returns pointer to &struct osd_waitevent
+ * Mainly used by Hyper-V drivers.
+ */
 struct osd_waitevent *osd_WaitEventCreate(void)
 {
        struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent),
@@ -98,6 +126,19 @@ struct osd_waitevent *osd_WaitEventCreate(void)
 }
 EXPORT_SYMBOL_GPL(osd_WaitEventCreate);

+
+/**
+ * osd_WaitEventSet() - Wake up the process
+ * @waitEvent: Structure to event to be woken up
+ *
+ * @waitevent is of type &struct osd_waitevent
+ *
+ * Wake up the sleeping process so it can do some work.
+ * And set condition indicator in &struct osd_waitevent to indicate
+ * the process is in a woken state.
+ *
+ * Only used by Network and Storage Hyper-V drivers.
+ */
 void osd_WaitEventSet(struct osd_waitevent *waitEvent)
 {
        waitEvent->condition = 1;
@@ -105,6 +146,20 @@ void osd_WaitEventSet(struct osd_waitevent *waitEvent)
 }
 EXPORT_SYMBOL_GPL(osd_WaitEventSet);

+/**
+ * osd_WaitEventWait() - Wait for event till condition is true
+ * @waitEvent: Structure to event to be put to sleep
+ *
+ * @waitevent is of type &struct osd_waitevent
+ *
+ * Set up the process to sleep until waitEvent->condition get true.
+ * And set condition indicator in &struct osd_waitevent to indicate
+ * the process is in a sleeping state.
+ *
+ * Returns the status of 'wait_event_interruptible()' system call
+ *
+ * Mainly used by Hyper-V drivers.
+ */
 int osd_WaitEventWait(struct osd_waitevent *waitEvent)
 {
        int ret = 0;
@@ -116,6 +171,21 @@ int osd_WaitEventWait(struct osd_waitevent *waitEvent)
 }
 EXPORT_SYMBOL_GPL(osd_WaitEventWait);

+/**
+ * osd_WaitEventWaitEx() - Wait for event or timeout for process wakeup
+ * @waitEvent: Structure to event to be put to sleep
+ * @TimeoutInMs:       Total number of Milliseconds to wait before waking up
+ *
+ * @waitevent is of type &struct osd_waitevent
+ * Set up the process to sleep until @waitEvent->condition get true or
+ * @TimeoutInMs (Time out in Milliseconds) has been reached.
+ * And set condition indicator in &struct osd_waitevent to indicate
+ * the process is in a sleeping state.
+ *
+ * Returns the status of 'wait_event_interruptible_timeout()' system call
+ *
+ * Mainly used by Hyper-V drivers.
+ */
 int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs)
 {
        int ret = 0;
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 3988f4b..7676ba5 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -129,7 +129,7 @@ static struct scsi_host_template scsi_driver = {
 };


-/**
+/*
  * storvsc_drv_init - StorVsc driver initialization.
  */
 static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
@@ -222,7 +222,7 @@ static void storvsc_drv_exit(void)
        return;
 }

-/**
+/*
  * storvsc_probe - Add a new device for this driver
  */
 static int storvsc_probe(struct device *device)
@@ -318,7 +318,7 @@ static int storvsc_probe(struct device *device)
        return ret;
 }

-/**
+/*
  * storvsc_remove - Callback when our device is removed
  */
 static int storvsc_remove(struct device *device)
@@ -371,7 +371,7 @@ static int storvsc_remove(struct device *device)
        return ret;
 }

-/**
+/*
  * storvsc_commmand_completion - Command completion processing
  */
 static void storvsc_commmand_completion(struct hv_storvsc_request *request)
@@ -622,7 +622,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
        return total_copied;
 }

-/**
+/*
  * storvsc_queuecommand - Initiate command processing
  */
 static int storvsc_queuecommand(struct scsi_cmnd *scmnd,
@@ -823,7 +823,7 @@ static int storvsc_merge_bvec(struct request_queue *q,
        return bvec->bv_len;
 }

-/**
+/*
  * storvsc_device_configure - Configure the specified scsi device
  */
 static int storvsc_device_alloc(struct scsi_device *sdevice)
@@ -862,7 +862,7 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
        return 0;
 }

-/**
+/*
  * storvsc_host_reset_handler - Reset the scsi HBA
  */
 static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 2c90619..177f565 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -128,7 +128,7 @@ static struct vmbus_driver_context g_vmbus_drv = {
        .bus.dev_attrs =        vmbus_device_attrs,
 };

-/**
+/*
  * vmbus_show_device_attr - Show the device attribute in sysfs.
  *
  * This is invoked when user does a
@@ -232,7 +232,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
        }
 }

-/**
+/*
  * vmbus_bus_init -Main vmbus driver initialization routine.
  *
  * Here, we
@@ -361,7 +361,7 @@ cleanup:
        return ret;
 }

-/**
+/*
  * vmbus_bus_exit - Terminate the vmbus driver.
  *
  * This routine is opposite of vmbus_bus_init()
@@ -397,8 +397,18 @@ static void vmbus_bus_exit(void)
        return;
 }

+
 /**
- * vmbus_child_driver_register - Register a vmbus's child driver
+ * vmbus_child_driver_register() - Register a vmbus's child driver
+ * @driver_ctx:        Pointer to driver structure you want to register
+ *
+ * @driver_ctx is of type &struct driver_context
+ *
+ * Registers the given driver with Linux through the 'driver_register()' call
+ * And sets up the hyper-v vmbus handling for this driver.
+ * It will return the state of the 'driver_register()' call.
+ *
+ * Mainly used by Hyper-V drivers.
  */
 int vmbus_child_driver_register(struct driver_context *driver_ctx)
 {
@@ -424,7 +434,15 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx)
 EXPORT_SYMBOL(vmbus_child_driver_register);

 /**
- * vmbus_child_driver_unregister Unregister a vmbus's child driver
+ * vmbus_child_driver_unregister() - Unregister a vmbus's child driver
+ * @driver_ctx:        Pointer to driver structure you want to un-register
+ *
+ * @driver_ctx is of type &struct driver_context
+ *
+ * Un-register the given driver with Linux through the 'driver_unregister()'
+ * call. And ungegisters the driver from the Hyper-V vmbus handler.
+ *
+ * Mainly used by Hyper-V drivers.
  */
 void vmbus_child_driver_unregister(struct driver_context *driver_ctx)
 {
@@ -442,9 +460,15 @@ void vmbus_child_driver_unregister(struct driver_context *driver_ctx)
 EXPORT_SYMBOL(vmbus_child_driver_unregister);

 /**
- * vmbus_get_interface - Get the vmbus channel interface.
+ * vmbus_get_interface() - Get the vmbus channel interface.
+ * @interface: Pointer to channel interface structure
+ *
+ * Get the Hyper-V channel used for the driver.
+ *
+ * @interface is of type &struct vmbus_channel_interface
+ * This is invoked by child/client driver that sits above vmbus.
  *
- * This is invoked by child/client driver that sits above vmbus
+ * Mainly used by Hyper-V drivers.
  */
 void vmbus_get_interface(struct vmbus_channel_interface *interface)
 {
@@ -454,7 +478,7 @@ void vmbus_get_interface(struct vmbus_channel_interface *interface)
 }
 EXPORT_SYMBOL(vmbus_get_interface);

-/**
+/*
  * vmbus_child_device_get_info - Get the vmbus child device info.
  *
  * This is invoked to display various device attributes in sysfs.
@@ -467,8 +491,9 @@ static void vmbus_child_device_get_info(struct hv_device *device_obj,
        vmbus_drv_obj->GetChannelInfo(device_obj, device_info);
 }

-/**
- * vmbus_child_device_create - Creates and registers a new child device on the vmbus.
+/*
+ * vmbus_child_device_create - Creates and registers a new child device
+ * on the vmbus.
  */
 static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
                                                   struct hv_guid *instance,
@@ -522,7 +547,7 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
        return child_device_obj;
 }

-/**
+/*
  * vmbus_child_device_register - Register the child device on the specified bus
  */
 static int vmbus_child_device_register(struct hv_device *root_device_obj,
@@ -570,8 +595,9 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
        return ret;
 }

-/**
- * vmbus_child_device_unregister - Remove the specified child device from the vmbus.
+/*
+ * vmbus_child_device_unregister - Remove the specified child device
+ * from the vmbus.
  */
 static void vmbus_child_device_unregister(struct hv_device *device_obj)
 {
@@ -594,7 +620,7 @@ static void vmbus_child_device_unregister(struct hv_device *device_obj)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_child_device_destroy - Destroy the specified child device on the vmbus.
  */
 static void vmbus_child_device_destroy(struct hv_device *device_obj)
@@ -604,7 +630,7 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_uevent - add uevent for our device
  *
  * This routine is invoked when a device is added or removed on the vmbus to
@@ -683,7 +709,7 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
        return 0;
 }

-/**
+/*
  * vmbus_match - Attempt to match the specified device to the specified driver
  */
 static int vmbus_match(struct device *device, struct device_driver *driver)
@@ -718,7 +744,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
        return match;
 }

-/**
+/*
  * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
  *
  * We need a callback because we cannot invoked device_unregister() inside
@@ -741,7 +767,7 @@ static void vmbus_probe_failed_cb(struct work_struct *context)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_probe - Add the new vmbus's child device
  */
 static int vmbus_probe(struct device *child_device)
@@ -777,7 +803,7 @@ static int vmbus_probe(struct device *child_device)
        return ret;
 }

-/**
+/*
  * vmbus_remove - Remove a vmbus device
  */
 static int vmbus_remove(struct device *child_device)
@@ -819,7 +845,7 @@ static int vmbus_remove(struct device *child_device)
        return 0;
 }

-/**
+/*
  * vmbus_shutdown - Shutdown a vmbus device
  */
 static void vmbus_shutdown(struct device *child_device)
@@ -855,7 +881,7 @@ static void vmbus_shutdown(struct device *child_device)
        return;
 }

-/**
+/*
  * vmbus_bus_release - Final callback release of the vmbus root device
  */
 static void vmbus_bus_release(struct device *device)
@@ -869,7 +895,7 @@ static void vmbus_bus_release(struct device *device)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_device_release - Final callback release of the vmbus child device
  */
 static void vmbus_device_release(struct device *device)
@@ -887,7 +913,7 @@ static void vmbus_device_release(struct device *device)
        return;
 }

-/**
+/*
  * vmbus_msg_dpc - Tasklet routine to handle hypervisor messages
  */
 static void vmbus_msg_dpc(unsigned long data)
@@ -904,7 +930,7 @@ static void vmbus_msg_dpc(unsigned long data)
        DPRINT_EXIT(VMBUS_DRV);
 }

-/**
+/*
  * vmbus_msg_dpc - Tasklet routine to handle hypervisor events
  */
 static void vmbus_event_dpc(unsigned long data)

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED
  2010-03-04 22:11   ` Hank Janssen
  (?)
@ 2010-03-04 22:37   ` Randy Dunlap
  -1 siblings, 0 replies; 16+ messages in thread
From: Randy Dunlap @ 2010-03-04 22:37 UTC (permalink / raw)
  To: Hank Janssen
  Cc: 'linux-kernel@vger.kernel.org',
	devel, virtualization, Haiyang Zhang, Hashir Abdi, Greg KH, joe

On Thu, 4 Mar 2010 22:11:00 +0000
Hank Janssen <hjanssen@microsoft.com> wrote:

> 
> From: Hank Janssen <hjanssen@microsoft.com>
> 
> Removed kerneldoc /** from functions that should not have them.
> Added proper kerneldoc headers to functions that should have them.
> 
> This includes fixes as pointed out by Randy Dunlap and Joe Perches.
> 
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Joe Perches <joe@perches.com>
> Cc: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-03-04 22:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
2010-02-17 21:05 ` Greg KH
2010-02-17 23:50 ` Greg KH
2010-02-17 23:52 ` Greg KH
2010-02-18 15:51   ` Haiyang Zhang
2010-03-03 16:42   ` Ringbuffer usage in Linux Hyper-V drivers Hank Janssen
2010-03-03 17:49     ` Jeremy Fitzhardinge
2010-03-03 23:39     ` Greg KH
2010-03-04 17:46 ` [PATCH 1/1] Stage: hv: Remove Ringbuffer from TODO line Hank Janssen
2010-03-04 17:48 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format Hank Janssen
2010-03-04 17:55   ` Joe Perches
2010-03-04 18:03   ` Randy Dunlap
2010-03-04 18:11     ` Hank Janssen
2010-03-04 22:11 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED Hank Janssen
2010-03-04 22:11   ` Hank Janssen
2010-03-04 22:37   ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.