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

[win-pv-devel] [PATCH 01/10] Remove unused code



From: Owen Smith <owen.smith@xxxxxxxxxx>

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xenvbd/target.c | 61 +----------------------------------------------------
 src/xenvbd/target.h | 22 -------------------
 2 files changed, 1 insertion(+), 82 deletions(-)

diff --git a/src/xenvbd/target.c b/src/xenvbd/target.c
index 3748210..c5dffa9 100644
--- a/src/xenvbd/target.c
+++ b/src/xenvbd/target.c
@@ -378,21 +378,6 @@ TargetIsMissing(
     return Missing;
 }
 
-FORCEINLINE const CHAR*
-TargetMissingReason(
-    __in PXENVBD_TARGET            Target
-    )
-{
-    KIRQL       Irql;
-    const CHAR* Reason;
-
-    KeAcquireSpinLock(&Target->Lock, &Irql);
-    Reason = Target->Reason;
-    KeReleaseSpinLock(&Target->Lock, Irql);
-
-    return Reason;
-}
-
 FORCEINLINE VOID
 TargetSetDevicePnpState(
     __in PXENVBD_TARGET             Target,
@@ -491,15 +476,6 @@ TargetIsPaused(
 }
 
 __checkReturn
-FORCEINLINE ULONG
-TargetOutstandingReqs(
-    __in PXENVBD_TARGET             Target
-    )
-{
-    return QueueCount(&Target->SubmittedReqs);
-}
-
-__checkReturn
 FORCEINLINE PXENVBD_ADAPTER
 TargetGetAdapter(
     __in PXENVBD_TARGET             Target
@@ -508,7 +484,7 @@ TargetGetAdapter(
     return Target->Adapter;
 }
 
-FORCEINLINE ULONG
+static FORCEINLINE ULONG
 TargetSectorSize(
     __in PXENVBD_TARGET             Target
     )
@@ -774,14 +750,6 @@ __Phys2Pfn(
     return (PFN_NUMBER)(PhysAddr.QuadPart >> PAGE_SHIFT);
 }
 
-static FORCEINLINE PFN_NUMBER
-__Virt2Pfn(
-    __in PVOID                   VirtAddr
-    )
-{
-    return (PFN_NUMBER)(MmGetPhysicalAddress(VirtAddr).QuadPart >> PAGE_SHIFT);
-}
-
 static FORCEINLINE MM_PAGE_PRIORITY
 __TargetPriority(
     __in PXENVBD_TARGET             Target
@@ -2194,33 +2162,6 @@ TargetStartIo(
     }
 }
 
-static FORCEINLINE VOID
-__TargetCleanupSubmittedReqs(
-    IN  PXENVBD_TARGET             Target
-    )
-{
-    // Fail PreparedReqs
-    for (;;) {
-        PXENVBD_SRBEXT  SrbExt;
-        PXENVBD_REQUEST Request;
-        PLIST_ENTRY     Entry = QueuePop(&Target->SubmittedReqs);
-        if (Entry == NULL)
-            break;
-        Request = CONTAINING_RECORD(Entry, XENVBD_REQUEST, Entry);
-        SrbExt = GetSrbExt(Request->Srb);
-
-        Verbose("Target[%d] : SubmittedReq 0x%p -> FAILED\n", 
TargetGetTargetId(Target), Request);
-
-        TargetPutRequest(Target, Request);
-
-        if (InterlockedDecrement(&SrbExt->Count) == 0) {
-            SrbExt->Srb->SrbStatus = SRB_STATUS_ABORTED;
-            SrbExt->Srb->ScsiStatus = 0x40; // SCSI_ABORTED
-            AdapterCompleteSrb(TargetGetAdapter(Target), SrbExt->Srb);
-        }
-    }
-}
-
 VOID
 TargetReset(
     __in PXENVBD_TARGET             Target
diff --git a/src/xenvbd/target.h b/src/xenvbd/target.h
index a89a314..9455d56 100644
--- a/src/xenvbd/target.h
+++ b/src/xenvbd/target.h
@@ -86,17 +86,6 @@ TargetIsMissing(
     __in PXENVBD_TARGET             Target
     );
 
-extern const CHAR*
-TargetMissingReason(
-    __in PXENVBD_TARGET            Target
-    );
-
-__checkReturn
-extern BOOLEAN
-TargetIsEmulatedUnplugged(
-    __in PXENVBD_TARGET             Target
-    );
-
 extern VOID
 TargetSetDevicePnpState(
     __in PXENVBD_TARGET             Target,
@@ -139,22 +128,11 @@ TargetIsPaused(
     );
 
 __checkReturn
-extern ULONG
-TargetOutstandingReqs(
-    __in PXENVBD_TARGET             Target
-    );
-
-__checkReturn
 extern PXENVBD_ADAPTER
 TargetGetAdapter(
     __in PXENVBD_TARGET             Target
     );
 
-extern ULONG
-TargetSectorSize(
-    __in PXENVBD_TARGET             Target
-    );
-
 // Queue-Related
 extern VOID
 TargetSubmitRequests(
-- 
2.8.3


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

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