[ofw] [PATCH 5/?] Fix declarations of driver dispatch routines

Fab Tillier ftillier at microsoft.com
Mon Jun 18 18:47:34 PDT 2012


When using DRIVER_DISPATCH to declare dispatch routines, there's no need to also explicitly declare them.

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

Index: core/bus/kernel/bus_driver.c
===================================================================
--- core/bus/kernel/bus_driver.c	(revision 3414)
+++ core/bus/kernel/bus_driver.c	(working copy)
@@ -81,31 +81,15 @@
 
 __drv_dispatchType(IRP_MJ_CREATE)
 static DRIVER_DISPATCH bus_drv_open;
-static NTSTATUS
-bus_drv_open(
-	IN				DEVICE_OBJECT				*p_dev_obj,
-	IN				IRP							*p_irp );
 
 __drv_dispatchType(IRP_MJ_CLEANUP)
 static DRIVER_DISPATCH bus_drv_cleanup;
-static NTSTATUS
-bus_drv_cleanup(
-	IN				DEVICE_OBJECT				*p_dev_obj,
-	IN				IRP							*p_irp );
 
 __drv_dispatchType(IRP_MJ_CLOSE)
 static DRIVER_DISPATCH bus_drv_close;
-static NTSTATUS
-bus_drv_close(
-	IN				DEVICE_OBJECT				*p_dev_obj,
-	IN				IRP							*p_irp );
 
 __drv_dispatchType(IRP_MJ_DEVICE_CONTROL)
 static DRIVER_DISPATCH bus_drv_ioctl;
-static NTSTATUS
-bus_drv_ioctl(
-	IN				DEVICE_OBJECT				*p_dev_obj,
-	IN				IRP							*p_irp );
 
 /***f* InfiniBand Bus Driver/bus_drv_sysctl
 * NAME
@@ -118,15 +102,9 @@
 */
 __drv_dispatchType(IRP_MJ_SYSTEM_CONTROL)
 static DRIVER_DISPATCH bus_drv_sysctl;
-static NTSTATUS
-bus_drv_sysctl(
-	IN				DEVICE_OBJECT				*p_dev_obj,
-	IN				IRP							*p_irp );
+
 /**********/
 static DRIVER_UNLOAD bus_drv_unload;
-static void
-bus_drv_unload(
-	IN				DRIVER_OBJECT				*p_driver_obj );
 
 DRIVER_INITIALIZE DriverEntry;
 NTSTATUS

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5.bus_drv_decl.patch
Type: application/octet-stream
Size: 1412 bytes
Desc: 5.bus_drv_decl.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20120619/94b8a4a5/attachment.obj>


More information about the ofw mailing list