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

[PATCH 12/18] Fix annotations in macros


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 15:26:49 +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: Fri, 16 Oct 2026 13:27:12 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

- Some annotations in macros were missed by mechanical conversion.
Fix them.
- TargetGetMissing() function in xenvbd:target.h call functions with side
effects (KeSpinLock|Unlock) annotated as _Inout_ on Target.
Fix this by explicitly defining TargetGetMissing() with the correct annotation.

Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xenvbd/adapter.h  | 4 ++--
 src/xenvbd/frontend.h | 2 +-
 src/xenvbd/target.h   | 8 ++++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/xenvbd/adapter.h b/src/xenvbd/adapter.h
index 41ad012..f319ae1 100644
--- a/src/xenvbd/adapter.h
+++ b/src/xenvbd/adapter.h
@@ -49,8 +49,8 @@ typedef struct _XENVBD_ADAPTER XENVBD_ADAPTER, 
*PXENVBD_ADAPTER;
 #define ADAPTER_GET_INTERFACE(_name, _type)     \
 extern VOID                                     \
 AdapterGet ## _name ## Interface(               \
-    IN  PXENVBD_ADAPTER Adapter,                \
-    OUT _type           _name ## Interface      \
+    _In_ PXENVBD_ADAPTER Adapter,               \
+    _Out_ _type           _name ## Interface    \
     );
 
 ADAPTER_GET_INTERFACE(Cache, PXENBUS_CACHE_INTERFACE)
diff --git a/src/xenvbd/frontend.h b/src/xenvbd/frontend.h
index bb2c57f..8b0ad8c 100644
--- a/src/xenvbd/frontend.h
+++ b/src/xenvbd/frontend.h
@@ -156,7 +156,7 @@ FrontendDestroy(
 #define FRONTEND_GET_PROPERTY(_name, _type)     \
 extern _type                                    \
 FrontendGet ## _name ## (                       \
-    IN  PXENVBD_FRONTEND    Frontend            \
+    _In_ PXENVBD_FRONTEND    Frontend           \
     );
 
 FRONTEND_GET_PROPERTY(Target, PXENVBD_TARGET)
diff --git a/src/xenvbd/target.h b/src/xenvbd/target.h
index e7cf2c6..05447ab 100644
--- a/src/xenvbd/target.h
+++ b/src/xenvbd/target.h
@@ -123,10 +123,15 @@ TargetShutdown(
     _In_ PXENVBD_SRBEXT SrbExt
     );
 
+extern BOOLEAN
+TargetGetMissing(
+    _Inout_ PXENVBD_TARGET  Target
+    );
+
 #define TARGET_GET_PROPERTY(_name, _type)       \
 extern _type                                    \
 TargetGet ## _name ## (                         \
-    IN  PXENVBD_TARGET  Target                  \
+    _In_ PXENVBD_TARGET  Target                 \
     );
 
 TARGET_GET_PROPERTY(Adapter, PXENVBD_ADAPTER)
@@ -135,7 +140,6 @@ TARGET_GET_PROPERTY(TargetId, ULONG)
 TARGET_GET_PROPERTY(DeviceId, ULONG)
 TARGET_GET_PROPERTY(Removable, BOOLEAN)
 TARGET_GET_PROPERTY(DevicePnpState, DEVICE_PNP_STATE)
-TARGET_GET_PROPERTY(Missing, BOOLEAN)
 
 #undef TARGET_GET_PROPERTY
 
-- 
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®.