[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/6] driver: fix annotations


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Date: Tue, 29 Sep 2026 19:05:12 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Cc: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Delivery-date: Tue, 29 Sep 2026 17:06:05 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

* __DriverSetDriverObject may be called with NULL on DriverCleanup
and DriverEntry failure path.

* Dispatch should use the same annotations as DRIVER_DISPATCH in wdm.h

Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xenhid/driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xenhid/driver.c b/src/xenhid/driver.c
index 6d3fc6f..669a62f 100644
--- a/src/xenhid/driver.c
+++ b/src/xenhid/driver.c
@@ -51,7 +51,7 @@ static XENHID_DRIVER    Driver;
 
 static FORCEINLINE VOID
 __DriverSetDriverObject(
-    _In_ PDRIVER_OBJECT DriverObject
+    _In_opt_ PDRIVER_OBJECT DriverObject
     )
 {
     Driver.DriverObject = DriverObject;
@@ -138,7 +138,7 @@ DRIVER_DISPATCH Dispatch;
 NTSTATUS 
 Dispatch(
     _In_ PDEVICE_OBJECT     DeviceObject,
-    _In_ PIRP               Irp
+    _Inout_ PIRP            Irp
     )
 {
     PHID_DEVICE_EXTENSION   Hid;
-- 
2.55.0.windows.5



--
Césaire Mounah | Vates Windows Guest Tools Engineer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.