|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 10/17] driver: fix annotation errors
* DRIVER_DISPATCH in wdm.h is annotated as (_In_, _Inout_), so
we annotate Dispatch the same.
* __DriverSetDriverObject and __DriverSetParametersKey are called with
DriverObject parameter set as Null on DriverEntry failure cleanup path and
DriverUnload cleanup respectively. DriverObject should be annotated as _opt_
in both cases.
Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
src/xeniface/driver.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/xeniface/driver.c b/src/xeniface/driver.c
index 74192cf..7c7d7e9 100644
--- a/src/xeniface/driver.c
+++ b/src/xeniface/driver.c
@@ -51,7 +51,7 @@ static XENIFACE_DRIVER Driver;
static FORCEINLINE VOID
__DriverSetDriverObject(
- _In_ PDRIVER_OBJECT DriverObject
+ _In_opt_ PDRIVER_OBJECT DriverObject
)
{
Driver.DriverObject = DriverObject;
@@ -75,7 +75,7 @@ DriverGetDriverObject(
static FORCEINLINE VOID
__DriverSetParametersKey(
- _In_ HANDLE Key
+ _In_opt_ HANDLE Key
)
{
Driver.ParametersKey = Key;
@@ -165,12 +165,12 @@ DRIVER_DISPATCH Dispatch;
NTSTATUS
Dispatch(
- _In_ PDEVICE_OBJECT DeviceObject,
- _In_ PIRP Irp
+ _In_ PDEVICE_OBJECT DeviceObject,
+ _Inout_ PIRP Irp
)
{
- PXENIFACE_DX Dx;
- NTSTATUS status;
+ PXENIFACE_DX Dx;
+ NTSTATUS status;
Dx = (PXENIFACE_DX)DeviceObject->DeviceExtension;
ASSERT3P(Dx->DeviceObject, ==, DeviceObject);
--
2.55.0.windows.5
--
Césaire Mounah | Vates Windows Guest Tools Engineer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |