From 0eb321bf2c1cc0e048faff26a01f86cdd3ec254f Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 7 Jul 2009 02:26:13 +0300 Subject: Remove trailing whitespace from most files --- vidix/dhahelperwin/dhahelper.c | 52 +++++++++++++++++++++--------------------- vidix/dhahelperwin/dhasetup.c | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'vidix/dhahelperwin') diff --git a/vidix/dhahelperwin/dhahelper.c b/vidix/dhahelperwin/dhahelper.c index 2289738792..702f3e52c1 100644 --- a/vidix/dhahelperwin/dhahelper.c +++ b/vidix/dhahelperwin/dhahelper.c @@ -87,7 +87,7 @@ STDCALL NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject,IN PUNICODE_STRING // can make requests to this device). ntStatus = IoCreateDevice(DriverObject,0,&DeviceNameUnicodeString,FILE_DEVICE_DHAHELPER,0,TRUE,&DeviceObject); - + if (NT_SUCCESS(ntStatus)){ // Create dispatch points for device control, create, close. DriverObject->MajorFunction[IRP_MJ_CREATE] = @@ -134,7 +134,7 @@ static STDCALL NTSTATUS dhahelperdispatch(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; - + IrpStack = IoGetCurrentIrpStackLocation(Irp); // Get the pointer to the input/output buffer and it's length @@ -225,7 +225,7 @@ static STDCALL void dhahelperunload(IN PDRIVER_OBJECT DriverObject){ NTSTATUS ntStatus=STATUS_SUCCESS; OutputDebugString ("dhahelper: entering dhahelperunload"); OutputDebugString ("dhahelper: unmapping remaining memory"); - + while(alloccount && (ntStatus==STATUS_SUCCESS))ntStatus = UnmapPhysicalMemory(alloclist[alloccount-1].UserVirtualAddress); RtlInitUnicodeString (&DeviceLinkUnicodeString, L"\\DosDevices\\DHAHELPER"); ntStatus = IoDeleteSymbolicLink (&DeviceLinkUnicodeString); @@ -260,7 +260,7 @@ static STDCALL NTSTATUS MapPhysicalMemoryToLinearSpace(PVOID pPhysAddress,ULONG PVOID UserVirtualAddress=NULL; PHYSICAL_ADDRESS pStartPhysAddress; OutputDebugString ("dhahelper: entering MapPhysicalMemoryToLinearSpace"); - + #ifdef _WIN64 pStartPhysAddress.QuadPart = (ULONGLONG)pPhysAddress; #else @@ -273,7 +273,7 @@ static STDCALL NTSTATUS MapPhysicalMemoryToLinearSpace(PVOID pPhysAddress,ULONG if(!SystemVirtualAddress){ OutputDebugString("dhahelper: MmMapIoSpace failed"); return STATUS_INVALID_PARAMETER; - } + } OutputDebugString("dhahelper: SystemVirtualAddress 0x%x",SystemVirtualAddress); Mdl=IoAllocateMdl(SystemVirtualAddress, PhysMemSizeInBytes, FALSE, FALSE,NULL); if(!Mdl){ @@ -293,22 +293,22 @@ static STDCALL NTSTATUS MapPhysicalMemoryToLinearSpace(PVOID pPhysAddress,ULONG } OutputDebugString("dhahelper: UserVirtualAddress 0x%x",UserVirtualAddress); #ifndef NO_SEH - }__except(EXCEPTION_EXECUTE_HANDLER){ - NTSTATUS ntStatus; - ntStatus = GetExceptionCode(); + }__except(EXCEPTION_EXECUTE_HANDLER){ + NTSTATUS ntStatus; + ntStatus = GetExceptionCode(); OutputDebugString("dhahelper: MapPhysicalMemoryToLinearSpace failed due to exception 0x%0x\n", ntStatus); - return ntStatus; + return ntStatus; } #endif - + OutputDebugString("dhahelper: adding data to internal allocation list"); alloclisttmp=MmAllocateNonCachedMemory((alloccount+1)*sizeof(alloc_priv)); - + if(!alloclisttmp){ OutputDebugString("dhahelper: not enough memory to create temporary allocation list"); - MmUnmapLockedPages(UserVirtualAddress, Mdl); + MmUnmapLockedPages(UserVirtualAddress, Mdl); IoFreeMdl(Mdl); return STATUS_INSUFFICIENT_RESOURCES; } @@ -322,9 +322,9 @@ static STDCALL NTSTATUS MapPhysicalMemoryToLinearSpace(PVOID pPhysAddress,ULONG alloclist[alloccount].UserVirtualAddress=UserVirtualAddress; alloclist[alloccount].PhysMemSizeInBytes=PhysMemSizeInBytes; ++alloccount; - - *PhysMemLin=UserVirtualAddress; - + + *PhysMemLin=UserVirtualAddress; + OutputDebugString("dhahelper: leaving MapPhysicalMemoryToLinearSpace"); return STATUS_SUCCESS; } @@ -338,7 +338,7 @@ static STDCALL NTSTATUS UnmapPhysicalMemory(PVOID UserVirtualAddress){ OutputDebugString("dhahelper: UnmapPhysicalMemory: nothing todo -> leaving..."); return STATUS_SUCCESS; } - + for(i=0;i