repository: C:/dev/kvm-guest-drivers-windows
branch: master
commit d26380f3b3943bb25b8b1a4e12d3c4fa1118898f
Author: Yan Vugenfirer <[email protected]>
Date:   Wed Oct 28 12:24:15 2009 +0200

    [WIN-GUEST-DRIVERS] viostor driver. remove trailing white spaces
    
        Signed-off-by: Vadim Rozenfeld<[email protected]>

diff --git a/viostor/SOURCES b/viostor/SOURCES
index 1352710..a98a081 100644
--- a/viostor/SOURCES
+++ b/viostor/SOURCES
@@ -1,7 +1,7 @@
 TARGETNAME=viostor
 TARGETTYPE=MINIPORT
 
-!if "$(DDK_TARGET_OS)" == "WinNET" 
+!if "$(DDK_TARGET_OS)" == "WinNET"
 C_DEFINES = -DUSE_STORPORT=1 $(C_DEFINES)
 TARGETLIBS=$(SDK_LIB_PATH)\storport.lib
 !elseif "$(DDK_TARGET_OS)" == "WinLH"
@@ -34,6 +34,6 @@ MSC_WARNING_LEVEL=/W3 /WX
 # UNSUPPORTED OPTION
 #
 # Define this if you want debug messages to come out the console
-# 
+#
 C_DEFINES = -DRHEL_COM_DEBUG=1 $(C_DEFINES)
 
diff --git a/viostor/osdep.h b/viostor/osdep.h
index bd4c766..a30c411 100644
--- a/viostor/osdep.h
+++ b/viostor/osdep.h
@@ -2,13 +2,13 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: osdep.h
- * 
- * This file contains highest level definitions 
+ *
+ * This file contains highest level definitions
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
  * the COPYING file in the top-level directory.
  *
-**********************************************************************/  
+**********************************************************************/
 #ifndef __OS_DEP_H
 #define __OS_DEP_H
 
diff --git a/viostor/txtsetup.oem b/viostor/txtsetup.oem
index 0a57c50..b38a26d 100644
--- a/viostor/txtsetup.oem
+++ b/viostor/txtsetup.oem
@@ -3,7 +3,7 @@ d1 = "OEM DISK (SCSI) Win2003/32-bit",\disk1,\i386\Win2003
 d2 = "OEM DISK (SCSI) Win2003/64-bit",\disk1,\amd64\Win2003
 
 [Defaults]
-SCSI = WNET32 
+SCSI = WNET32
 
 [scsi]
 WNET32 = "Red Hat VirtIO SCSI Disk Device Win2003/32-bit"
diff --git a/viostor/virtio_pci.c b/viostor/virtio_pci.c
index 6023cef..a72b019 100644
--- a/viostor/virtio_pci.c
+++ b/viostor/virtio_pci.c
@@ -30,7 +30,7 @@
 #include "virtio_stor.h"
 
 
-VOID 
+VOID
 VirtIODeviceDumpRegisters(
     IN PVOID DeviceExtension)
 {
@@ -49,9 +49,9 @@ VirtIODeviceDumpRegisters(
 }
 
 
-bool 
+bool
 VirtIODeviceGetHostFeature(
-    IN PVOID DeviceExtension, 
+    IN PVOID DeviceExtension,
     unsigned uFeature)
 {
     PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension;
@@ -61,7 +61,7 @@ VirtIODeviceGetHostFeature(
     return !!(ScsiPortReadPortUlong((PULONG)(adaptExt->device_base + 
VIRTIO_PCI_HOST_FEATURES)) & (1 << uFeature));
 }
 
-VOID 
+VOID
 VirtIODeviceReset(
     IN PVOID DeviceExtension)
 {
@@ -74,7 +74,7 @@ VirtIODeviceReset(
 
 VOID
 VirtIODeviceGet(
-    IN PVOID DeviceExtension, 
+    IN PVOID DeviceExtension,
     unsigned offset,
     PVOID buf,
     unsigned len)
@@ -93,7 +93,7 @@ VirtIODeviceGet(
     }
 }
 
-UCHAR 
+UCHAR
 VirtIODeviceISR(
     IN PVOID DeviceExtension)
 {
@@ -106,8 +106,8 @@ VirtIODeviceISR(
 
 
 // the notify function used when creating a virt queue /
-static 
-VOID 
+static
+VOID
 vp_notify(
     IN struct virtqueue *vq)
 {
@@ -117,11 +117,11 @@ vp_notify(
     RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("%s>> queue %d\n", __FUNCTION__, 
info->queue_index));
 
     // we write the queue's selector into the notification register to
-    // * signal the other end 
-    ScsiPortWritePortUshort((PUSHORT)(adaptExt->device_base + 
VIRTIO_PCI_QUEUE_NOTIFY),(USHORT)(info->queue_index)); 
+    // * signal the other end
+    ScsiPortWritePortUshort((PUSHORT)(adaptExt->device_base + 
VIRTIO_PCI_QUEUE_NOTIFY),(USHORT)(info->queue_index));
 }
 
-struct 
+struct
 virtqueue*
 VirtIODeviceFindVirtualQueue(
     IN PVOID DeviceExtension,
@@ -133,7 +133,7 @@ VirtIODeviceFindVirtualQueue(
     u16                num;
     ULONG              dummy;
     PHYSICAL_ADDRESS   pa;
-    ULONG              pageNum;    
+    ULONG              pageNum;
     unsigned           res;
     PADAPTER_EXTENSION adaptExt = (PADAPTER_EXTENSION)DeviceExtension;
 
@@ -160,7 +160,7 @@ VirtIODeviceFindVirtualQueue(
         return NULL;
 
     // allocate and fill out our structure the represents an active queue
-    info = &adaptExt->pci_vq_info; 
+    info = &adaptExt->pci_vq_info;
 
     info->queue_index = index;
     info->num = num;
@@ -168,8 +168,8 @@ VirtIODeviceFindVirtualQueue(
     RhelDbgPrint(TRACE_LEVEL_FATAL, ("[%s] info = %p, info->queue = %p\n", 
__FUNCTION__, info, info->queue) );
     // create the vring
     memset(info->queue, 0, vring_size(num,PAGE_SIZE));
-    vq = vring_new_virtqueue(info->num, 
-                             DeviceExtension, 
+    vq = vring_new_virtqueue(info->num,
+                             DeviceExtension,
                              info->queue,
                              vp_notify);
 
@@ -181,7 +181,7 @@ VirtIODeviceFindVirtualQueue(
     vq->priv = info;
     info->vq = vq;
 
-    // activate the queue 
+    // activate the queue
     pa = ScsiPortGetPhysicalAddress(DeviceExtension, NULL, info->queue, 
&dummy);
     pageNum = (ULONG)(pa.QuadPart >> PAGE_SHIFT);
     RhelDbgPrint(TRACE_LEVEL_FATAL, ("[%s] queue phys.address %08lx:%08lx, pfn 
%lx\n", __FUNCTION__, pa.u.HighPart, pa.u.LowPart, pageNum));
@@ -202,7 +202,7 @@ VirtIODeviceFindVirtualQueue(
 }
 
 
-void 
+void
 VirtIODeviceDeleteVirtualQueue(
     IN struct virtqueue *vq)
 {
diff --git a/viostor/virtio_pci.h b/viostor/virtio_pci.h
index 8f99e18..3e143d4 100644
--- a/viostor/virtio_pci.h
+++ b/viostor/virtio_pci.h
@@ -78,38 +78,38 @@ typedef struct virtio_pci_vq_info
 }virtio_pci_vq_info;
 
 
-VOID 
+VOID
 VirtIODeviceReset(
     IN PVOID DeviceExtension);
 
-VOID 
+VOID
 VirtIODeviceDumpRegisters(
     IN PVOID DeviceExtension);
 
-bool 
+bool
 VirtIODeviceGetHostFeature(
-    IN PVOID DeviceExtension, 
+    IN PVOID DeviceExtension,
     IN unsigned uFeature);
 
-void 
+void
 VirtIODeviceGet(
     IN PVOID DeviceExtension,
     unsigned offset,
     PVOID buf,
     unsigned len);
 
-UCHAR 
+UCHAR
 VirtIODeviceISR(
     IN PVOID DeviceExtension);
 
-struct 
+struct
 virtqueue*
 VirtIODeviceFindVirtualQueue(
     IN PVOID DeviceExtension,
     IN unsigned index,
     IN unsigned vector);
 
-void 
+void
 VirtIODeviceDeleteVirtualQueue(
     IN struct virtqueue *vq);
 
diff --git a/viostor/virtio_ring.c b/viostor/virtio_ring.c
index df7033b..d099bb8 100644
--- a/viostor/virtio_ring.c
+++ b/viostor/virtio_ring.c
@@ -29,8 +29,8 @@
 #include "virtio_stor_utils.h"
 #include "virtio_stor.h"
 
-static 
-VOID 
+static
+VOID
 initialize_virtqueue(
     IN struct vring_virtqueue *vq,
     IN unsigned int num,
@@ -42,8 +42,8 @@ initialize_virtqueue(
 //#define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq)
 #define to_vvq(_vq) (struct vring_virtqueue *)_vq
 
-static 
-int 
+static
+int
 vring_add_buf(
     IN struct virtqueue *_vq,
     IN struct VirtIOBufferDescriptor sg[],
@@ -72,11 +72,11 @@ vring_add_buf(
     if (vq->num_free < out + in) {
         RhelDbgPrint(TRACE_LEVEL_ERROR, ("%s: can't add buf len %i - avail = 
%i\n",
            __FUNCTION__, out + in, vq->num_free) );
-        /* 
+        /*
         notify the host immediately if we are out of
         descriptors in tx ring
         */
-        if (out) 
+        if (out)
            vq->notify(&vq->vq);
         return -1;
     }
@@ -113,17 +113,17 @@ vring_add_buf(
     avail = (vq->vring.avail->idx + vq->num_added++) % vq->vring.num;
     RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("%s >>> avail %d vq->vring.avail->idx = 
%d, vq->num_added = %d vq->vring.num = %d\n",
         __FUNCTION__, avail, vq->vring.avail->idx, vq->num_added, 
vq->vring.num));
-    
+
     vq->vring.avail->ring[avail] = (u16) head;
 
-    RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("%s: Added buffer head %i to %p\n", 
+    RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("%s: Added buffer head %i to %p\n",
         __FUNCTION__, head, vq) );
 
     return 0;
 }
 
-static 
-VOID 
+static
+VOID
 vring_kick_always(
     struct virtqueue *_vq)
 {
@@ -143,8 +143,8 @@ vring_kick_always(
     vq->notify(&vq->vq);
 }
 
-static 
-VOID 
+static
+VOID
 vring_kick(
     struct virtqueue *_vq)
 {
@@ -167,10 +167,10 @@ vring_kick(
     }
 }
 
-static 
-VOID 
+static
+VOID
 detach_buf(
-    struct vring_virtqueue *vq, 
+    struct vring_virtqueue *vq,
     unsigned int head)
 {
     unsigned int i;
@@ -192,13 +192,13 @@ detach_buf(
 }
 
 
-/* 
+/*
  changed: vring_shutdown brings the queue to initial state, as it was
  upon initialization (for proper power management)
 */
 /* FIXME: We need to tell other side about removal, to synchronize. */
-static 
-VOID 
+static
+VOID
 vring_shutdown(
     struct virtqueue *_vq)
 {
@@ -214,18 +214,18 @@ vring_shutdown(
     vq->vq.priv = priv;
 }
 
-static 
-bool 
+static
+bool
 more_used(
     const struct vring_virtqueue *vq)
 {
     return vq->last_used_idx != vq->vring.used->idx;
 }
 
-static 
-PVOID 
+static
+PVOID
 vring_get_buf(
-    struct virtqueue *_vq, 
+    struct virtqueue *_vq,
     unsigned int *len)
 {
     struct vring_virtqueue *vq = to_vvq(_vq);
@@ -258,8 +258,8 @@ vring_get_buf(
     return ret;
 }
 
-static 
-bool 
+static
+bool
 vring_restart(
     struct virtqueue *_vq)
 {
@@ -279,7 +279,7 @@ vring_restart(
     return 1;
 }
 
-static struct virtqueue_ops vring_vq_ops = { 
+static struct virtqueue_ops vring_vq_ops = {
     vring_add_buf,
     vring_kick,
     vring_kick_always,
@@ -289,7 +289,7 @@ static struct virtqueue_ops vring_vq_ops = {
 };
 
 
-VOID 
+VOID
 initialize_virtqueue(
     struct vring_virtqueue *vq,
     unsigned int num,
@@ -316,7 +316,7 @@ initialize_virtqueue(
 
 }
 
-struct 
+struct
 virtqueue*
 vring_new_virtqueue(
     unsigned int num,
@@ -337,7 +337,7 @@ vring_new_virtqueue(
     }
 
     vq = adaptExt->virtqueue;
-       
+
     initialize_virtqueue(vq, num, DeviceExtension, pages, notify);
 
     return &vq->vq;
diff --git a/viostor/virtio_ring.h b/viostor/virtio_ring.h
index fb0f7a3..c43f954 100644
--- a/viostor/virtio_ring.h
+++ b/viostor/virtio_ring.h
@@ -106,10 +106,10 @@ typedef struct _declspec(align(PAGE_SIZE)) vring_virtqueue
     void *data[];
 }vring_virtqueue, *pvring_virtqueue;
 
-static 
-VOID 
-vring_init(struct vring *vr, 
-           unsigned int num, 
+static
+VOID
+vring_init(struct vring *vr,
+           unsigned int num,
            IN PVOID p,
            unsigned long pagesize)
 {
@@ -127,7 +127,7 @@ static  unsigned vring_size(unsigned int num, unsigned long 
pagesize)
         + sizeof(u16) * 2 + sizeof(struct vring_used_elem) * num;
 }
 
-struct 
+struct
 virtqueue*
 vring_new_virtqueue(
     unsigned int num,
diff --git a/viostor/virtio_stor.c b/viostor/virtio_stor.c
index a3c7458..d363909 100644
--- a/viostor/virtio_stor.c
+++ b/viostor/virtio_stor.c
@@ -2,11 +2,11 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor.c
- * 
+ *
  * Author(s):
  *  Vadim Rozenfeld <[email protected]>
  *
- * This file contains viostor StorPort(ScsiPort) miniport driver 
+ * This file contains viostor StorPort(ScsiPort) miniport driver
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
  * the COPYING file in the top-level directory.
@@ -102,7 +102,7 @@ RhelScsiReportLuns(
 VOID
 FORCEINLINE
 CompleteSRB(
-    IN PVOID DeviceExtension, 
+    IN PVOID DeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb
     );
 
@@ -118,7 +118,7 @@ ULONG
 DriverEntry(
     IN PVOID  DriverObject,
     IN PVOID  RegistryPath
-    ) 
+    )
 {
 
     HW_INITIALIZATION_DATA hwInitData;
@@ -131,7 +131,7 @@ DriverEntry(
 
     IsCrashDumpMode = FALSE;
     if (RegistryPath == NULL) {
-        RhelDbgPrint(TRACE_LEVEL_INFORMATION, 
+        RhelDbgPrint(TRACE_LEVEL_INFORMATION,
                      ("DriverEntry: Crash dump mode\n"));
         IsCrashDumpMode = TRUE;
     }
@@ -172,16 +172,16 @@ DriverEntry(
 #else
     hwInitData.MapBuffers               = TRUE;
 #endif
-    initResult = ScsiPortInitialize(DriverObject, 
-                                    RegistryPath, 
-                                    &hwInitData, 
+    initResult = ScsiPortInitialize(DriverObject,
+                                    RegistryPath,
+                                    &hwInitData,
                                     NULL);
 
-    RhelDbgPrint(TRACE_LEVEL_VERBOSE, 
+    RhelDbgPrint(TRACE_LEVEL_VERBOSE,
                  ("Initialize returned 0x%x\n", initResult));
 
     return initResult;
- 
+
 }
 
 ULONG
@@ -192,7 +192,7 @@ VirtIoFindAdapter(
     IN PCHAR ArgumentString,
     IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo,
     OUT PBOOLEAN Again
-    ) 
+    )
 {
 
     PACCESS_RANGE      accessRange;
@@ -267,7 +267,7 @@ VirtIoFindAdapter(
                    (*ConfigInfo->AccessRanges)[0].RangeLength));
 
         return SP_RETURN_ERROR;
-    }  
+    }
 
 
     ConfigInfo->NumberOfBuses               = 1;
@@ -363,7 +363,7 @@ VirtIoPassiveInitializeRoutine (
 BOOLEAN
 VirtIoHwInitialize(
     IN PVOID DeviceExtension
-    ) 
+    )
 {
 
     PADAPTER_EXTENSION adaptExt;
@@ -377,7 +377,7 @@ VirtIoHwInitialize(
     RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("%s (%d)\n", __FUNCTION__, 
KeGetCurrentIrql()));
 
     adaptExt = (PADAPTER_EXTENSION)DeviceExtension;
-    
+
 #ifdef MSI_SUPPORTED
     while(StorPortGetMSIInfo(DeviceExtension, adaptExt->msix_vectors, 
&msi_info) == STOR_STATUS_SUCCESS) {
         RhelDbgPrint(TRACE_LEVEL_INFORMATION, ("MessageId = %x\n", 
msi_info.MessageId));
@@ -466,7 +466,7 @@ VirtIoHwInitialize(
     memset(&adaptExt->inquiry_data, 0, sizeof(INQUIRYDATA));
 
     adaptExt->inquiry_data.ANSIVersion = 4;
-    adaptExt->inquiry_data.ResponseDataFormat = 2; 
+    adaptExt->inquiry_data.ResponseDataFormat = 2;
     adaptExt->inquiry_data.CommandQueue = 1;
     adaptExt->inquiry_data.DeviceType   = DIRECT_ACCESS_DEVICE;
     adaptExt->inquiry_data.Wide32Bit    = 1;
@@ -489,7 +489,7 @@ BOOLEAN
 VirtIoStartIo(
     IN PVOID DeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb
-    ) 
+    )
 {
     PCDB cdb = (PCDB)&Srb->Cdb[0];
 
@@ -521,12 +521,12 @@ VirtIoStartIo(
 
     switch (cdb->CDB6GENERIC.OperationCode) {
         case SCSIOP_MODE_SENSE: {
-            Srb->SrbStatus = RhelScsiGetModeSense(DeviceExtension, Srb); 
+            Srb->SrbStatus = RhelScsiGetModeSense(DeviceExtension, Srb);
             CompleteSRB(DeviceExtension, Srb);
             return TRUE;
         }
         case SCSIOP_INQUIRY: {
-            Srb->SrbStatus = RhelScsiGetInquiryData(DeviceExtension, Srb); 
+            Srb->SrbStatus = RhelScsiGetInquiryData(DeviceExtension, Srb);
             CompleteSRB(DeviceExtension, Srb);
             return TRUE;
         }
@@ -551,17 +551,17 @@ VirtIoStartIo(
                 if (lastLBA > 0xFFFFFFFF) {
                     readCap->LogicalBlockAddress = (ULONG)-1;
                 } else {
-                    REVERSE_BYTES(&readCap->LogicalBlockAddress, 
+                    REVERSE_BYTES(&readCap->LogicalBlockAddress,
                                   &lastLBA);
                 }
-                REVERSE_BYTES(&readCap->BytesPerBlock, 
+                REVERSE_BYTES(&readCap->BytesPerBlock,
                               &adaptExt->info.size_max);
             } else {
-                ASSERT(Srb->DataTransferLength == 
+                ASSERT(Srb->DataTransferLength ==
                                     sizeof(READ_CAPACITY_DATA_EX));
-                REVERSE_BYTES_QUAD(&readCapEx->LogicalBlockAddress.QuadPart, 
+                REVERSE_BYTES_QUAD(&readCapEx->LogicalBlockAddress.QuadPart,
                                    &lastLBA);
-                REVERSE_BYTES(&readCap->BytesPerBlock, 
+                REVERSE_BYTES(&readCap->BytesPerBlock,
                               &adaptExt->info.size_max);
             }
 
@@ -569,7 +569,7 @@ VirtIoStartIo(
             CompleteSRB(DeviceExtension, Srb);
             return TRUE;
         }
-        case SCSIOP_READ: 
+        case SCSIOP_READ:
         case SCSIOP_WRITE: {
             Srb->SrbStatus = SRB_STATUS_PENDING;
             if(!RhelDoReadWrite(DeviceExtension, Srb)) {
@@ -589,8 +589,8 @@ VirtIoStartIo(
         case SCSIOP_RESERVE_UNIT10:
         case SCSIOP_RELEASE_UNIT:
         case SCSIOP_RELEASE_UNIT10:
-        case SCSIOP_VERIFY: 
-        case SCSIOP_SYNCHRONIZE_CACHE: 
+        case SCSIOP_VERIFY:
+        case SCSIOP_SYNCHRONIZE_CACHE:
         case SCSIOP_MEDIUM_REMOVAL: {
             Srb->SrbStatus = SRB_STATUS_SUCCESS;
             Srb->ScsiStatus = SCSISTAT_GOOD;
@@ -603,12 +603,12 @@ VirtIoStartIo(
     }
 
     if (cdb->CDB12.OperationCode == SCSIOP_REPORT_LUNS) {
-        Srb->SrbStatus = RhelScsiReportLuns(DeviceExtension, Srb); 
+        Srb->SrbStatus = RhelScsiReportLuns(DeviceExtension, Srb);
         CompleteSRB(DeviceExtension, Srb);
         return TRUE;
 
     }
-    
+
     Srb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
     CompleteSRB(DeviceExtension, Srb);
     return TRUE;
@@ -618,7 +618,7 @@ VirtIoStartIo(
 BOOLEAN
 VirtIoInterrupt(
     IN PVOID DeviceExtension
-    ) 
+    )
 {
     pblk_req            vbr;
     unsigned int        len;
@@ -657,7 +657,7 @@ BOOLEAN
 VirtIoResetBus(
     IN PVOID DeviceExtension,
     IN ULONG PathId
-    ) 
+    )
 {
     RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("<--->%s\n", __FUNCTION__));
     return TRUE;
@@ -668,7 +668,7 @@ VirtIoAdapterControl(
     IN PVOID DeviceExtension,
     IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
     IN PVOID Parameters
-    ) 
+    )
 {
     PSCSI_SUPPORTED_CONTROL_TYPE_LIST ControlTypeList;
     ULONG                             AdjustedMaxControlType;
@@ -678,13 +678,13 @@ VirtIoAdapterControl(
     BOOLEAN SupportedConrolTypes[5] = {TRUE, TRUE, TRUE, FALSE, FALSE};
 
     adaptExt = (PADAPTER_EXTENSION)DeviceExtension;
-        
+
     RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("%s %d\n", __FUNCTION__, ControlType));
 
     switch (ControlType) {
 
     case ScsiQuerySupportedControlTypes: {
-        RhelDbgPrint(TRACE_LEVEL_VERBOSE, 
("ScsiQuerySupportedControlTypes\n")); 
+        RhelDbgPrint(TRACE_LEVEL_VERBOSE, 
("ScsiQuerySupportedControlTypes\n"));
         ControlTypeList = (PSCSI_SUPPORTED_CONTROL_TYPE_LIST)Parameters;
         AdjustedMaxControlType =
             (ControlTypeList->MaxControlType < 5) ?
@@ -698,13 +698,13 @@ VirtIoAdapterControl(
         break;
     }
     case ScsiStopAdapter: {
-        RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("ScsiStopAdapter\n")); 
+        RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("ScsiStopAdapter\n"));
         RhelShutDown(DeviceExtension);
         status = ScsiAdapterControlSuccess;
         break;
     }
     case ScsiRestartAdapter: {
-        RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("ScsiRestartAdapter\n")); 
+        RhelDbgPrint(TRACE_LEVEL_VERBOSE, ("ScsiRestartAdapter\n"));
         adaptExt->pci_vq_info.vq = NULL;
 #ifdef MSI_SUPPORTED
         if(!adaptExt->dump_mode & adaptExt->msix_vectors) {
@@ -714,7 +714,7 @@ VirtIoAdapterControl(
         if(!adaptExt->pci_vq_info.vq) {
            adaptExt->pci_vq_info.vq = 
VirtIODeviceFindVirtualQueue(DeviceExtension, 0, 0);
         }
-        if (!adaptExt->pci_vq_info.vq) 
+        if (!adaptExt->pci_vq_info.vq)
         {
            RhelDbgPrint(TRACE_LEVEL_FATAL, ("Cannot find snd virtual 
queue\n"));
            break;
@@ -735,10 +735,10 @@ BOOLEAN
 VirtIoBuildIo(
     IN PVOID DeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb
-    ) 
+    )
 {
     PCDB                  cdb;
-    ULONG                 i; 
+    ULONG                 i;
     ULONG                 dummy;
     ULONG                 sgElement;
     PADAPTER_EXTENSION    adaptExt;
@@ -759,15 +759,15 @@ VirtIoBuildIo(
 
     switch (cdb->CDB6GENERIC.OperationCode) {
         case SCSIOP_READ:
-        case SCSIOP_WRITE: 
-        case SCSIOP_WRITE_VERIFY: 
+        case SCSIOP_WRITE:
+        case SCSIOP_WRITE_VERIFY:
         case SCSIOP_READ6:
-        case SCSIOP_WRITE6: 
+        case SCSIOP_WRITE6:
         case SCSIOP_READ12:
-        case SCSIOP_WRITE12: 
-        case SCSIOP_WRITE_VERIFY12: 
+        case SCSIOP_WRITE12:
+        case SCSIOP_WRITE_VERIFY12:
         case SCSIOP_READ16:
-        case SCSIOP_WRITE16: 
+        case SCSIOP_WRITE16:
         case SCSIOP_WRITE_VERIFY16: {
             break;
         }
@@ -798,10 +798,10 @@ VirtIoBuildIo(
         srbExt->in = sgElement;
     }
 
-    srbExt->vbr.sg[0].physAddr = ScsiPortGetPhysicalAddress(DeviceExtension, 
NULL, &srbExt->vbr.out_hdr, &dummy); 
+    srbExt->vbr.sg[0].physAddr = ScsiPortGetPhysicalAddress(DeviceExtension, 
NULL, &srbExt->vbr.out_hdr, &dummy);
     srbExt->vbr.sg[0].ulSize = sizeof(srbExt->vbr.out_hdr);
 
-    srbExt->vbr.sg[sgElement].physAddr = 
ScsiPortGetPhysicalAddress(DeviceExtension, NULL, &srbExt->vbr.status, &dummy); 
  
+    srbExt->vbr.sg[sgElement].physAddr = 
ScsiPortGetPhysicalAddress(DeviceExtension, NULL, &srbExt->vbr.status, &dummy);
     srbExt->vbr.sg[sgElement].ulSize = sizeof(srbExt->vbr.status);
 
     return TRUE;
@@ -866,13 +866,13 @@ RhelScsiGetInquiryData(
     dataLen = Srb->DataTransferLength;
 
     SrbStatus = SRB_STATUS_SUCCESS;
-    if((cdb->CDB6INQUIRY3.PageCode != VPD_SUPPORTED_PAGES) && 
+    if((cdb->CDB6INQUIRY3.PageCode != VPD_SUPPORTED_PAGES) &&
        (cdb->CDB6INQUIRY3.EnableVitalProductData == 0)) {
         Srb->ScsiStatus = SCSISTAT_CHECK_CONDITION;
     }
-    else if ((cdb->CDB6INQUIRY3.PageCode == VPD_SUPPORTED_PAGES) && 
+    else if ((cdb->CDB6INQUIRY3.PageCode == VPD_SUPPORTED_PAGES) &&
              (cdb->CDB6INQUIRY3.EnableVitalProductData == 1)) {
-        
+
         PVPD_SUPPORTED_PAGES_PAGE SupportPages;
         SupportPages = (PVPD_SUPPORTED_PAGES_PAGE)Srb->DataBuffer;
         memset(SupportPages, 0, sizeof(VPD_SUPPORTED_PAGES_PAGE));
@@ -883,9 +883,9 @@ RhelScsiGetInquiryData(
         SupportPages->SupportedPageList[2] = VPD_DEVICE_IDENTIFIERS;
         Srb->DataTransferLength = sizeof(VPD_SUPPORTED_PAGES_PAGE) + 
SupportPages->PageLength;
     }
-    else if ((cdb->CDB6INQUIRY3.PageCode == VPD_SERIAL_NUMBER) && 
+    else if ((cdb->CDB6INQUIRY3.PageCode == VPD_SERIAL_NUMBER) &&
              (cdb->CDB6INQUIRY3.EnableVitalProductData == 1)) {
-        
+
         PVPD_SERIAL_NUMBER_PAGE SerialPage;
         SerialPage = (PVPD_SERIAL_NUMBER_PAGE)Srb->DataBuffer;
         SerialPage->PageCode = VPD_SERIAL_NUMBER;
@@ -900,7 +900,7 @@ RhelScsiGetInquiryData(
     }
     else if ((cdb->CDB6INQUIRY3.PageCode == VPD_DEVICE_IDENTIFIERS) &&
              (cdb->CDB6INQUIRY3.EnableVitalProductData == 1)) {
-        
+
         PVPD_IDENTIFICATION_PAGE IdentificationPage;
         PVPD_IDENTIFICATION_DESCRIPTOR IdentificationDescr;
         IdentificationPage = (PVPD_IDENTIFICATION_PAGE)Srb->DataBuffer;
@@ -921,7 +921,7 @@ RhelScsiGetInquiryData(
         IdentificationDescr->Identifier[5] = '0';
         IdentificationDescr->Identifier[6] = '0';
         IdentificationDescr->Identifier[7] = '1';
-        Srb->DataTransferLength = sizeof(VPD_IDENTIFICATION_PAGE) + 
+        Srb->DataTransferLength = sizeof(VPD_IDENTIFICATION_PAGE) +
                                  IdentificationPage->PageLength;
 
     }
@@ -998,10 +998,10 @@ RhelScsiGetModeSense(
 
         } else {
            Srb->DataTransferLength = sizeof(MODE_PARAMETER_HEADER);
-        }    
-        
+        }
+
         SrbStatus = SRB_STATUS_SUCCESS;
-        
+
     }
     else if (cdb->MODE_SENSE.PageCode == MODE_PAGE_VENDOR_SPECIFIC) {
 
@@ -1029,7 +1029,7 @@ RhelScsiGetModeSense(
            Srb->DataTransferLength = sizeof(MODE_PARAMETER_HEADER);
         }
         SrbStatus = SRB_STATUS_SUCCESS;
-        
+
     } else {
         SrbStatus = SRB_STATUS_INVALID_REQUEST;
     }
@@ -1040,7 +1040,7 @@ RhelScsiGetModeSense(
 ULONGLONG
 RhelGetLba(
     PCDB Cdb
-    ) 
+    )
 {
 
     EIGHT_BYTE lba;
@@ -1048,7 +1048,7 @@ RhelGetLba(
     switch (Cdb->CDB6GENERIC.OperationCode) {
 
         case SCSIOP_READ:
-        case SCSIOP_WRITE: 
+        case SCSIOP_WRITE:
         case SCSIOP_WRITE_VERIFY: {
             lba.AsULongLong = 0;
             lba.Byte0 = Cdb->CDB10.LogicalBlockByte3;
@@ -1066,14 +1066,14 @@ RhelGetLba(
             return lba.AsULongLong;
         }
         case SCSIOP_READ12:
-        case SCSIOP_WRITE12: 
+        case SCSIOP_WRITE12:
         case SCSIOP_WRITE_VERIFY12: {
             lba.AsULongLong = 0;
             REVERSE_BYTES(&lba, &Cdb->CDB12.LogicalBlock[0]);
             return lba.AsULongLong;
         }
         case SCSIOP_READ16:
-        case SCSIOP_WRITE16: 
+        case SCSIOP_WRITE16:
         case SCSIOP_WRITE_VERIFY16: {
             lba.AsULongLong = 0;
             REVERSE_BYTES_QUAD(&lba, &Cdb->CDB16.LogicalBlock[0]);
@@ -1091,7 +1091,7 @@ RhelGetLba(
 
 VOID
 CompleteSRB(
-    IN PVOID DeviceExtension, 
+    IN PVOID DeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb
     )
 {
diff --git a/viostor/virtio_stor.h b/viostor/virtio_stor.h
index 063c1d1..456fa0e 100644
--- a/viostor/virtio_stor.h
+++ b/viostor/virtio_stor.h
@@ -2,16 +2,16 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor.h
- * 
- * Main include file 
- * This file contains vrious routines and globals 
+ *
+ * Main include file
+ * This file contains vrious routines and globals
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
  * the COPYING file in the top-level directory.
  *
 **********************************************************************/
 
-#ifndef ___VIOSTOR_H__ 
+#ifndef ___VIOSTOR_H__
 #define ___VIOSTOR_H__
 
 #include <ntddk.h>
@@ -119,6 +119,6 @@ typedef struct _RHEL_SRB_EXTENSION {
 ULONGLONG
 RhelGetLba(
     PCDB Cdb
-    ); 
+    );
 
 #endif ___VIOSTOR__H__
diff --git a/viostor/virtio_stor.rc b/viostor/virtio_stor.rc
index e82a6de..4d86e0b 100644
--- a/viostor/virtio_stor.rc
+++ b/viostor/virtio_stor.rc
@@ -2,7 +2,7 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor.rc
- * 
+ *
  * This file contains resource (version) definitions for viostor driver.
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -28,7 +28,7 @@
 #undef  VER_PRODUCTMINORVERSION
 
 #undef  VER_LEGALCOPYRIGHT_STR
-#define VER_LEGALCOPYRIGHT_STR      "Copyright (C) 2009 Red Hat Inc." 
+#define VER_LEGALCOPYRIGHT_STR      "Copyright (C) 2009 Red Hat Inc."
 
 #undef  VER_COMPANYNAME_STR
 #define VER_COMPANYNAME_STR         "Red Hat Inc."
diff --git a/viostor/virtio_stor_hw_helper.c b/viostor/virtio_stor_hw_helper.c
index a697b90..ed6abf7 100644
--- a/viostor/virtio_stor_hw_helper.c
+++ b/viostor/virtio_stor_hw_helper.c
@@ -2,10 +2,10 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor_hw_helper.c
- * 
+ *
  * Author(s):
- * Vadim Rozenfeld <[email protected]>  
- * 
+ * Vadim Rozenfeld <[email protected]>
+ *
  * This file contains various virtio queue related routines.
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -63,9 +63,9 @@ RhelDoReadWrite(PVOID DeviceExtension,
 
     while (BytesLeft) {
         srbExt->vbr.sg[sgElement].physAddr = 
ScsiPortGetPhysicalAddress(DeviceExtension, Srb, DataBuffer, &fragLen);
-        srbExt->vbr.sg[sgElement].ulSize = fragLen;            
+        srbExt->vbr.sg[sgElement].ulSize = fragLen;
         BytesLeft -= fragLen;
-        DataBuffer = (PVOID)((ULONG_PTR)DataBuffer + fragLen); 
+        DataBuffer = (PVOID)((ULONG_PTR)DataBuffer + fragLen);
         sgElement++;
     }
 
@@ -83,14 +83,14 @@ RhelDoReadWrite(PVOID DeviceExtension,
         srbExt->in = sgElement;
     }
 
-    srbExt->vbr.sg[0].physAddr = ScsiPortGetPhysicalAddress(DeviceExtension, 
NULL, &srbExt->vbr.out_hdr, &fragLen); 
+    srbExt->vbr.sg[0].physAddr = ScsiPortGetPhysicalAddress(DeviceExtension, 
NULL, &srbExt->vbr.out_hdr, &fragLen);
     srbExt->vbr.sg[0].ulSize = sizeof(srbExt->vbr.out_hdr);
 
-    srbExt->vbr.sg[sgElement].physAddr = 
ScsiPortGetPhysicalAddress(DeviceExtension, NULL, &srbExt->vbr.status, 
&fragLen);   
+    srbExt->vbr.sg[sgElement].physAddr = 
ScsiPortGetPhysicalAddress(DeviceExtension, NULL, &srbExt->vbr.status, 
&fragLen);
     srbExt->vbr.sg[sgElement].ulSize = sizeof(srbExt->vbr.status);
 
 
-    if (adaptExt->pci_vq_info.vq->vq_ops->add_buf(adaptExt->pci_vq_info.vq, 
+    if (adaptExt->pci_vq_info.vq->vq_ops->add_buf(adaptExt->pci_vq_info.vq,
                                       &srbExt->vbr.sg[0],
                                       srbExt->out, srbExt->in,
                                       &srbExt->vbr) == 0) {
@@ -103,7 +103,7 @@ RhelDoReadWrite(PVOID DeviceExtension,
 }
 #endif
 
-VOID 
+VOID
 RhelShutDown(
     IN PVOID DeviceExtension
     )
diff --git a/viostor/virtio_stor_hw_helper.h b/viostor/virtio_stor_hw_helper.h
index 3f7bc39..c1fcafa 100644
--- a/viostor/virtio_stor_hw_helper.h
+++ b/viostor/virtio_stor_hw_helper.h
@@ -2,10 +2,10 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor_hw_helper.h
- * 
+ *
  * Author(s):
- * Vadim Rozenfeld <[email protected]>  
- * 
+ * Vadim Rozenfeld <[email protected]>
+ *
  * Virtio block device include module.
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -29,13 +29,13 @@
 #include "virtio_pci.h"
 #include "virtio_stor.h"
 
-BOOLEAN 
+BOOLEAN
 RhelDoReadWrite(
     IN PVOID DeviceExtension,
     PSCSI_REQUEST_BLOCK Srb
     );
 
-VOID 
+VOID
 RhelShutDown(
     IN PVOID DeviceExtension
     );
diff --git a/viostor/virtio_stor_utils.c b/viostor/virtio_stor_utils.c
index d989992..db025af 100644
--- a/viostor/virtio_stor_utils.c
+++ b/viostor/virtio_stor_utils.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor_utils.c
- * 
+ *
  * This file contains debug print routine implementation.
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -17,7 +17,7 @@ RhelDbgPrintToComPort(
     __in LPTSTR Format,
     ...
     )
-{   
+{
     ULONG rc = 0;
     CHAR szbuffer[512];
 
diff --git a/viostor/virtio_stor_utils.h b/viostor/virtio_stor_utils.h
index e93411d..43e904c 100644
--- a/viostor/virtio_stor_utils.h
+++ b/viostor/virtio_stor_utils.h
@@ -2,8 +2,8 @@
  * Copyright (c) 2008  Red Hat, Inc.
  *
  * File: virtio_stor_utils.h
- * 
- * 
+ *
+ *
  * This file contains debug print support routines and globals.
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -23,12 +23,12 @@
 #endif
 #include <stdarg.h>
 
-int 
-_cdecl 
+int
+_cdecl
 _vsnprintf(
-    char *buf, 
-    size_t size, 
-    const char *fmt, 
+    char *buf,
+    size_t size,
+    const char *fmt,
     va_list args
     );
 #define vsnprintf _vsnprintf
@@ -77,7 +77,7 @@ RhelDbgPrintToComPort(
     }
 #endif RHEL_COM_DEBUG
 #else DBG
-#define RhelDbgPrint(__LEVEL__,__MSG__) 
+#define RhelDbgPrint(__LEVEL__,__MSG__)
 #endif DBG
 
 #endif ___VIOSTOR_UTILS_H___
diff --git a/viostor/wlh.inf b/viostor/wlh.inf
index 42566ac..83ead2b 100644
--- a/viostor/wlh.inf
+++ b/viostor/wlh.inf
@@ -112,6 +112,3 @@ REG_DWORD      = 0x00010001
 SERVICE_KERNEL_DRIVER  = 1
 SERVICE_BOOT_START     = 0
 SERVICE_ERROR_NORMAL   = 1
-
-
-
diff --git a/viostor/wnet.inf b/viostor/wnet.inf
index 5682aa7..6665149 100644
--- a/viostor/wnet.inf
+++ b/viostor/wnet.inf
@@ -99,6 +99,3 @@ REG_DWORD      = 0x00010001
 SERVICE_KERNEL_DRIVER  = 1
 SERVICE_BOOT_START     = 0
 SERVICE_ERROR_NORMAL   = 1
-
-
-
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to