Commit Graph

12 Commits

Author SHA1 Message Date
Bill Pemberton f488841708 Staging: hv: remove wrapper functions for atomic operations
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Greg Kroah-Hartman bd1de70916 Staging: hv: fix sparse static warnings
This fixes up all of the sparse warnings about static functions.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Nicolas Palix 775ef25e57 Staging: hv: Remove typedef DRIVER_OBJECT and PDRIVER_OBJECT
typedef DRIVER_OBJECT and PDRIVER_OBJECT are removed and their usages
are replace by the use of struct hv_driver and struct hv_driver *
respectively.

Here is the semantic patch generated to perform this transformation:
(http://coccinelle.lip6.fr/)

//<smpl>
@rm_DRIVER_OBJECT@
@@
-typedef struct _DRIVER_OBJECT
+struct hv_driver
{...}
-DRIVER_OBJECT
;

@rm_PDRIVER_OBJECT@
@@
-typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
+struct hv_driver;

@fixtypedef_DRIVER_OBJECT@
typedef DRIVER_OBJECT;
@@
-DRIVER_OBJECT
+struct hv_driver

@fixstruct__DRIVER_OBJECT@
@@
struct
-_DRIVER_OBJECT
+hv_driver

@fixtypedef_PDRIVER_OBJECT@
typedef PDRIVER_OBJECT;
@@
-PDRIVER_OBJECT
+struct hv_driver*
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Nicolas Palix 3d3b5518a3 Staging: hv: Transform PDEVICE_OBJECT and DEVICE_OBJECT typedefs into their corresponding structs
Remove typedef DEVICE_OBJECT and use a struct named hv_device instead.
Remove typedef PDEVICE_OBJECT which aliases a pointer and use
struct hv_device * instead.

Here is the semantic patch to perform this transformation:
(http://coccinelle.lip6.fr/)

//<smpl>
@rm_PDEVICE_OBJECT@
@@
-typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;

@rm_DEVICE_OBJECT@
@@
-typedef struct _DEVICE_OBJECT
+struct hv_device
{...}
-DEVICE_OBJECT
;

@fixtypedef_PDEVICE_OBJECT@
typedef PDEVICE_OBJECT;
@@
-PDEVICE_OBJECT
+struct hv_device*

@fixtypedef_DEVICE_OBJECT@
typedef DEVICE_OBJECT;
@@
-DEVICE_OBJECT
+struct hv_device

@fixstruct__DEVICE_OBJECT@
@@
struct
-_DEVICE_OBJECT
+hv_device
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:51 -07:00
Bill Pemberton 25fb66ce44 Staging: hv: vmbus_drv.c: remove unused structs
vmbus_ctl_table_hdr, vmbus_dev_ctl_table, vmbus_ctl_table, and
vmus_root_ctl_table were never used.  This removes them.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:51 -07:00
Bill Pemberton 5d48a1c202 Staging: hv: check return value of device_register()
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:51 -07:00
Bill Pemberton c19fbca307 Staging: hv: check return value of bus_register()
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:50 -07:00
Bill Pemberton b2aba7cc71 Staging: hv: vmbus_drv.c: fix print formatting
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:50 -07:00
Bill Pemberton 454f18a963 Staging: hv: Remove C99 comments
Remove C99 // comments with traditional /* */ comments

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:50 -07:00
Moritz Muehlenhoff c18b5aed9d Staging: hv: Remove compatibility ifdefry
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:49 -07:00
Greg Kroah-Hartman 09d50ff8a2 Staging: hv: make the Hyper-V virtual bus code build
The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

I also fixed up the direct access of bus_id, as that field is now gone.

The hv_vmbus code should now build properly, with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:44 -07:00
Hank Janssen 3e7ee4902f Staging: hv: add the Hyper-V virtual bus
This is the virtual bus that all of the Linux Hyper-V drivers use.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:43 -07:00