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

[PATCH 17/21] transmitter,controller: fix some annotations


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

* In __TransmitterRequestMulticastControl, StorePrintf is called on Transaction
and Transaction is annotated there as _In_opt_ so we put the same annotation
to __TransmitterRequestMulticastControl to suppress warning on Transaction.

* KSERVICE_ROUTINE is already annotated in wdm.h,
TransmitterRingEvtchnCallback and ControllerEvtchnCallback are annotated to
use the same annotation with _Use_decl_annotations_ so we remove the
annotations in their parameters.

Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xenvif/controller.c  |  4 ++--
 src/xenvif/transmitter.c | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/xenvif/controller.c b/src/xenvif/controller.c
index 95fdae6..37d10c4 100644
--- a/src/xenvif/controller.c
+++ b/src/xenvif/controller.c
@@ -354,8 +354,8 @@ KSERVICE_ROUTINE    ControllerEvtchnCallback;
 _Use_decl_annotations_
 BOOLEAN
 ControllerEvtchnCallback(
-    _In_ PKINTERRUPT            InterruptObject,
-    _In_ PVOID                  Argument
+    PKINTERRUPT                 InterruptObject,
+    PVOID                       Argument
     )
 {
     PXENVIF_CONTROLLER          Controller = Argument;
diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index aff06b7..3263089 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -3303,8 +3303,8 @@ KSERVICE_ROUTINE    TransmitterRingEvtchnCallback;
 _Use_decl_annotations_
 BOOLEAN
 TransmitterRingEvtchnCallback(
-    _In_ PKINTERRUPT            InterruptObject,
-    _In_ PVOID                  Argument
+    PKINTERRUPT                 InterruptObject,
+    PVOID                       Argument
     )
 {
     PXENVIF_TRANSMITTER_RING    Ring = Argument;
@@ -4803,13 +4803,13 @@ fail1:
 _IRQL_requires_(DISPATCH_LEVEL)
 static FORCEINLINE NTSTATUS
 __TransmitterRequestMulticastControl(
-    _In_ PXENVIF_TRANSMITTER        Transmitter,
-    _In_ PXENBUS_STORE_TRANSACTION  Transaction,
-    _In_ BOOLEAN                    Enabled
+    _In_ PXENVIF_TRANSMITTER            Transmitter,
+    _In_opt_ PXENBUS_STORE_TRANSACTION  Transaction,
+    _In_ BOOLEAN                        Enabled
     )
 {
-    PXENVIF_FRONTEND                Frontend;
-    NTSTATUS                        status;
+    PXENVIF_FRONTEND                    Frontend;
+    NTSTATUS                            status;
 
     Frontend = Transmitter->Frontend;
 
-- 
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®.