|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 05/21] xenvif: Annotate unannotated functions
Some functions had pointer parameters with no SAL annotation at all.
We add annotations describing each parameter's actual use.
TranslatedAddress in BusTranslateAddress is not a **T type so we fix
the annotation to _Out_.
No functional change.
Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
src/xenvif/bus.c | 2 +-
src/xenvif/fdo.c | 8 ++++----
src/xenvif/frontend.c | 22 +++++++++++-----------
src/xenvif/registry.c | 4 ++--
src/xenvif/vif.c | 2 +-
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/xenvif/bus.c b/src/xenvif/bus.c
index 4017e7c..07e8c24 100644
--- a/src/xenvif/bus.c
+++ b/src/xenvif/bus.c
@@ -94,7 +94,7 @@ BusTranslateAddress(
_In_ PHYSICAL_ADDRESS BusAddress,
_In_ ULONG Length,
_Inout_ PULONG AddressSpace,
- _Outptr_ PPHYSICAL_ADDRESS TranslatedAddress
+ _Out_ PPHYSICAL_ADDRESS TranslatedAddress
)
{
PXENVIF_BUS_CONTEXT Context = _Context;
diff --git a/src/xenvif/fdo.c b/src/xenvif/fdo.c
index 46ac5b7..91e4141 100644
--- a/src/xenvif/fdo.c
+++ b/src/xenvif/fdo.c
@@ -926,8 +926,8 @@ __FdoFreeAnsi(
static NTSTATUS
FdoScan(
- PXENVIF_THREAD Self,
- PVOID Context
+ _In_ PXENVIF_THREAD Self,
+ _In_ PVOID Context
)
{
PXENVIF_FDO Fdo = Context;
@@ -3205,8 +3205,8 @@ fail1:
#define DEFINE_FDO_GET_INTERFACE(_Interface, _Type) \
VOID \
FdoGet ## _Interface ## Interface( \
- IN PXENVIF_FDO Fdo, \
- OUT _Type _Interface ## Interface \
+ _In_ PXENVIF_FDO Fdo, \
+ _Out_ _Type _Interface ## Interface \
) \
{ \
* ## _Interface ## Interface = Fdo-> ## _Interface ## Interface; \
diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index 313631d..be0fccd 100644
--- a/src/xenvif/frontend.c
+++ b/src/xenvif/frontend.c
@@ -329,7 +329,7 @@ FrontendFreePath(
#define DEFINE_FRONTEND_GET_FUNCTION(_Function, _Type) \
static FORCEINLINE _Type \
__FrontendGet ## _Function( \
- IN PXENVIF_FRONTEND Frontend \
+ _In_ PXENVIF_FRONTEND Frontend \
) \
{ \
return Frontend-> ## _Function; \
@@ -337,7 +337,7 @@ __FrontendGet ## _Function( \
\
_Type \
FrontendGet ## _Function( \
- IN PXENVIF_FRONTEND Frontend \
+ _In_ PXENVIF_FRONTEND Frontend \
) \
{ \
return __FrontendGet ## _Function ## (Frontend); \
@@ -2052,17 +2052,17 @@ FrontendIsSplit(
_IRQL_requires_(DISPATCH_LEVEL)
static FORCEINLINE NTSTATUS
__FrontendUpdateHash(
- PXENVIF_FRONTEND Frontend,
- PXENVIF_FRONTEND_HASH Hash
+ _In_ PXENVIF_FRONTEND Frontend,
+ _In_ PXENVIF_FRONTEND_HASH Hash
)
{
- PXENVIF_CONTROLLER Controller;
- ULONG Zero = 0;
- ULONG NetifAlgorithm;
- ULONG Size;
- PULONG Mapping;
- ULONG Flags;
- NTSTATUS status;
+ PXENVIF_CONTROLLER Controller;
+ ULONG Zero = 0;
+ ULONG NetifAlgorithm;
+ ULONG Size;
+ PULONG Mapping;
+ ULONG Flags;
+ NTSTATUS status;
Controller = __FrontendGetController(Frontend);
diff --git a/src/xenvif/registry.c b/src/xenvif/registry.c
index 119c697..4586079 100644
--- a/src/xenvif/registry.c
+++ b/src/xenvif/registry.c
@@ -1430,7 +1430,7 @@ fail1:
static PKEY_VALUE_PARTIAL_INFORMATION
RegistryAnsiToSz(
- PANSI_STRING Ansi
+ _In_ PANSI_STRING Ansi
)
{
ULONG Length;
@@ -1476,7 +1476,7 @@ fail1:
static PKEY_VALUE_PARTIAL_INFORMATION
RegistryAnsiToMultiSz(
- PANSI_STRING Ansi
+ _In_ PANSI_STRING Ansi
)
{
ULONG Length;
diff --git a/src/xenvif/vif.c b/src/xenvif/vif.c
index 3c7dd41..279df15 100644
--- a/src/xenvif/vif.c
+++ b/src/xenvif/vif.c
@@ -939,7 +939,7 @@ VifTransmitterQueryRingSize(
static NTSTATUS
VifAcquire(
- PINTERFACE Interface
+ _In_ PINTERFACE Interface
)
{
PXENVIF_VIF_CONTEXT Context = Interface->Context;
--
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 |