From 77e5187212691a8f15f76f82052a6add78165ce8 Mon Sep 17 00:00:00 2001 From: Konstantin Kostiuk Date: Thu, 14 Nov 2024 16:53:19 +0200 Subject: [PATCH] RHEL-65784: Fix files ending clang-format always check one \n at the end of file. Jira: https://issues.redhat.com/browse/RHEL-65784 Signed-off-by: Konstantin Kostiuk --- NetKVM/CoInstaller/Exception.h | 1 - NetKVM/CoInstaller/NetKVMAux.cpp | 1 - NetKVM/CoInstaller/RegAccess.cpp | 1 - NetKVM/CoInstaller/RegParam.cpp | 2 -- NetKVM/CoInstaller/RegParam.h | 1 - NetKVM/CoInstaller/tstrings.h | 2 -- NetKVM/Common/ParaNdis-RSS.h | 1 - NetKVM/Common/ParaNdis_GuestAnnounce.h | 2 +- NetKVM/Common/ParaNdis_LockFreeQueue.h | 2 +- NetKVM/Common/Trace.h | 2 +- NetKVM/Common/netkvmd.h | 3 +- NetKVM/DebugTools/Netchecksum/netchecksum.cpp | 4 +-- NetKVM/DebugTools/RSS-Toeplitz/WinToeplitz.c | 2 -- NetKVM/ProtocolService/Log.h | 1 - NetKVM/linux/if_ether.h | 1 - NetKVM/wlh/ParaNdis6_Driver.h | 2 +- VirtIO/virtio_pci_common.h | 2 +- fwcfg64/driver.h | 1 - ivshmem/Driver.c | 2 +- pvpanic/pvpanic/trace.h | 1 - viocrypt/dll/dllmain.c | 1 - viocrypt/sys/driver.h | 4 +-- viogpu/common/edid.h | 2 +- viogpu/common/viogpu.h | 1 - viogpu/common/viogpu_pci.h | 1 - viogpu/common/viogpu_queue.h | 3 +- viogpu/viogpudo/driver.cpp | 1 - viogpu/viogpudo/driver.h | 1 - viogpu/viogpudo/viogpudo.h | 1 - viomem/sys/Device.c | 31 ++++++++--------- viomem/sys/precomp.h | 1 - viomem/sys/viomem.h | 3 +- vioscsi/resources.h | 1 - vioserial/app/device.h | 1 - vioserial/app/notifier.h | 1 - vioserial/app/win/sys/socket.h | 2 +- vioserial/app/win/sys/time.h | 2 +- vioserial/lib/PnPAll.h | 1 - vioserial/lib/port.cpp | 1 - vioserial/lib/stdafx.h | 2 -- vioserial/sys/Driver.c | 1 - vioserial/sys/IsrDpc.c | 1 - vioserial/sys/trace.h | 1 - viosock/sys/Driver.c | 2 +- viosock/sys/Socket.c | 3 +- viosock/sys/Tx.c | 2 +- viosock/viosock-wsk-test/viosockwsk-test.c | 34 +++++++++---------- viosock/wsk/wsk-utils.c | 7 ++-- viostor/virtio_stor_utils.h | 1 - 49 files changed, 53 insertions(+), 94 deletions(-) diff --git a/NetKVM/CoInstaller/Exception.h b/NetKVM/CoInstaller/Exception.h index c11006094..66f6340ca 100644 --- a/NetKVM/CoInstaller/Exception.h +++ b/NetKVM/CoInstaller/Exception.h @@ -62,4 +62,3 @@ class neTKVMW32ErrorException : public neTKVMNumErrorException static tstring GetErrorString(DWORD dwErrorCode); }; #endif - diff --git a/NetKVM/CoInstaller/NetKVMAux.cpp b/NetKVM/CoInstaller/NetKVMAux.cpp index 64d7123cd..7461a1246 100644 --- a/NetKVM/CoInstaller/NetKVMAux.cpp +++ b/NetKVM/CoInstaller/NetKVMAux.cpp @@ -50,4 +50,3 @@ wstring NetKVMGetKeyPathFromKKEY(HKEY hKey) } return wstrKeyPath; } - diff --git a/NetKVM/CoInstaller/RegAccess.cpp b/NetKVM/CoInstaller/RegAccess.cpp index 8e54524c5..69060e331 100644 --- a/NetKVM/CoInstaller/RegAccess.cpp +++ b/NetKVM/CoInstaller/RegAccess.cpp @@ -543,4 +543,3 @@ VOID neTKVMRegAccess::FormatFullRegPath(LPTSTR lpzFullPathBuff, DWORD_PTR dwNumb } } } - diff --git a/NetKVM/CoInstaller/RegParam.cpp b/NetKVM/CoInstaller/RegParam.cpp index a2aa92f26..9c64b3498 100644 --- a/NetKVM/CoInstaller/RegParam.cpp +++ b/NetKVM/CoInstaller/RegParam.cpp @@ -403,5 +403,3 @@ void neTKVMRegEditParam::FillExInfo(neTKVMRegParamExInfoList &ExInfoList) ExInfoList.push_back(neTKVMRegParamExInfo(NETKVM_RPIID_EDIT_TEXT_LIMIT, tss.str())); } } - - diff --git a/NetKVM/CoInstaller/RegParam.h b/NetKVM/CoInstaller/RegParam.h index 18b62415b..ad3f58b20 100644 --- a/NetKVM/CoInstaller/RegParam.h +++ b/NetKVM/CoInstaller/RegParam.h @@ -203,4 +203,3 @@ class neTKVMRegEditParam : public neTKVMRegParam DWORD m_nLimitText; bool m_bUpperCase; }; - diff --git a/NetKVM/CoInstaller/tstrings.h b/NetKVM/CoInstaller/tstrings.h index ed8921f05..625e32e32 100644 --- a/NetKVM/CoInstaller/tstrings.h +++ b/NetKVM/CoInstaller/tstrings.h @@ -44,5 +44,3 @@ wstring __string2wstring(const string& str); typedef list> neTKVMTStrList; #define TBUF_SIZEOF(a) ARRAY_SIZE(a) - - diff --git a/NetKVM/Common/ParaNdis-RSS.h b/NetKVM/Common/ParaNdis-RSS.h index a43f5c117..7a1dc0cf8 100644 --- a/NetKVM/Common/ParaNdis-RSS.h +++ b/NetKVM/Common/ParaNdis-RSS.h @@ -118,4 +118,3 @@ class PARANDIS_RSS_PARAMS #endif #endif - diff --git a/NetKVM/Common/ParaNdis_GuestAnnounce.h b/NetKVM/Common/ParaNdis_GuestAnnounce.h index bfae66249..f0be8c187 100644 --- a/NetKVM/Common/ParaNdis_GuestAnnounce.h +++ b/NetKVM/Common/ParaNdis_GuestAnnounce.h @@ -64,4 +64,4 @@ class CGuestAnnouncePackets : public CPlacementAllocatable EthernetNSMFrame *CreateIPv6Packet(USHORT *IPV6); }; -bool CallCompletionForNBL(PARANDIS_ADAPTER * pContext, PNET_BUFFER_LIST NBL); \ No newline at end of file +bool CallCompletionForNBL(PARANDIS_ADAPTER * pContext, PNET_BUFFER_LIST NBL); diff --git a/NetKVM/Common/ParaNdis_LockFreeQueue.h b/NetKVM/Common/ParaNdis_LockFreeQueue.h index 10b4b1f2d..9579d21e5 100644 --- a/NetKVM/Common/ParaNdis_LockFreeQueue.h +++ b/NetKVM/Common/ParaNdis_LockFreeQueue.h @@ -342,4 +342,4 @@ class CLockFreeDynamicQueue : public CPlacementAllocatable volatile LONG m_QueueFullListIsEmpty; volatile LONG m_ElementCount; volatile LONG m_Size; -}; \ No newline at end of file +}; diff --git a/NetKVM/Common/Trace.h b/NetKVM/Common/Trace.h index 6e688c1ce..fe2c95c6c 100644 --- a/NetKVM/Common/Trace.h +++ b/NetKVM/Common/Trace.h @@ -61,4 +61,4 @@ // // FUNC TraceNoPrefix{Flags=TRACE_DRIVER}(LEVEL, MSG, ...); // end_wpp -// \ No newline at end of file +// diff --git a/NetKVM/Common/netkvmd.h b/NetKVM/Common/netkvmd.h index 322a95ddb..6fb6ed1a6 100644 --- a/NetKVM/Common/netkvmd.h +++ b/NetKVM/Common/netkvmd.h @@ -38,7 +38,7 @@ typedef struct _NETKVMD_ADAPTER UCHAR MacAddress[6]; UCHAR Virtio; UCHAR IsStandby; - + UCHAR VirtioLink; UCHAR SuppressLink; UCHAR Started; @@ -60,4 +60,3 @@ typedef struct _NETKVMD_SET_LINK // input buffer = NETKVMD_SET_LINK #define IOCTL_NETKVMD_SET_LINK CTL_CODE(FILE_DEVICE_NETWORK, 0x802, METHOD_BUFFERED, FILE_READ_ACCESS) - diff --git a/NetKVM/DebugTools/Netchecksum/netchecksum.cpp b/NetKVM/DebugTools/Netchecksum/netchecksum.cpp index a9cd7f5d2..0eb96e8c7 100755 --- a/NetKVM/DebugTools/Netchecksum/netchecksum.cpp +++ b/NetKVM/DebugTools/Netchecksum/netchecksum.cpp @@ -170,10 +170,8 @@ int _tmain(int argc, _TCHAR* argv[]) } DPrintf(0, ("Unit test %s", bOK ? "PASSED" : "FAILED")); - + //getchar(); return 0; } - - diff --git a/NetKVM/DebugTools/RSS-Toeplitz/WinToeplitz.c b/NetKVM/DebugTools/RSS-Toeplitz/WinToeplitz.c index f6497267e..cb85bd91c 100644 --- a/NetKVM/DebugTools/RSS-Toeplitz/WinToeplitz.c +++ b/NetKVM/DebugTools/RSS-Toeplitz/WinToeplitz.c @@ -45,5 +45,3 @@ UINT32 ToeplitzHash(const PHASH_CALC_SG_BUF_ENTRY sgBuff, int sgEntriesNum, UINT #undef TOEPLITZ_BYTE_BIT_STATE #undef TOEPLITZ_MAX_BIT_NUM } - - diff --git a/NetKVM/ProtocolService/Log.h b/NetKVM/ProtocolService/Log.h index 1ee44d224..8d6b727a6 100644 --- a/NetKVM/ProtocolService/Log.h +++ b/NetKVM/ProtocolService/Log.h @@ -2,4 +2,3 @@ #define ELEMENTS_IN(a) sizeof(a)/sizeof(a[0]) #define Log(fmt, ...) { CStringA _s_; _s_.Format(fmt "\n", __VA_ARGS__); OutputDebugStringA(_s_); } - diff --git a/NetKVM/linux/if_ether.h b/NetKVM/linux/if_ether.h index 6e4c531a3..372ecad37 100644 --- a/NetKVM/linux/if_ether.h +++ b/NetKVM/linux/if_ether.h @@ -4,4 +4,3 @@ #define ETH_ALEN 6 #endif - diff --git a/NetKVM/wlh/ParaNdis6_Driver.h b/NetKVM/wlh/ParaNdis6_Driver.h index 43f62289b..fa9af6e84 100644 --- a/NetKVM/wlh/ParaNdis6_Driver.h +++ b/NetKVM/wlh/ParaNdis6_Driver.h @@ -2,4 +2,4 @@ #include "ndis56common.h" VOID ParaNdis6_SendNBLInternal(NDIS_HANDLE miniportAdapterContext, PNET_BUFFER_LIST pNBL, - NDIS_PORT_NUMBER portNumber, ULONG flags); \ No newline at end of file + NDIS_PORT_NUMBER portNumber, ULONG flags); diff --git a/VirtIO/virtio_pci_common.h b/VirtIO/virtio_pci_common.h index c7d5676b5..064997cf6 100644 --- a/VirtIO/virtio_pci_common.h +++ b/VirtIO/virtio_pci_common.h @@ -85,4 +85,4 @@ bool vp_notify(struct virtqueue *vq); NTSTATUS vio_legacy_initialize(VirtIODevice *vdev); NTSTATUS vio_modern_initialize(VirtIODevice *vdev); -#endif \ No newline at end of file +#endif diff --git a/fwcfg64/driver.h b/fwcfg64/driver.h index 46442f9cc..e8c100108 100644 --- a/fwcfg64/driver.h +++ b/fwcfg64/driver.h @@ -96,4 +96,3 @@ NTSTATUS VMCoreInfoFill(PDEVICE_CONTEXT ctx); NTSTATUS VMCoreInfoSend(PDEVICE_CONTEXT ctx); NTSTATUS GetKdbg(PDEVICE_CONTEXT ctx); - diff --git a/ivshmem/Driver.c b/ivshmem/Driver.c index 0e151850f..47889b1b0 100644 --- a/ivshmem/Driver.c +++ b/ivshmem/Driver.c @@ -28,4 +28,4 @@ NTSTATUS IVSHMEMEvtDeviceAdd(_In_ WDFDRIVER Driver, _Inout_ PWDFDEVICE_INIT Devi status = IVSHMEMCreateDevice(DeviceInit); return status; -} \ No newline at end of file +} diff --git a/pvpanic/pvpanic/trace.h b/pvpanic/pvpanic/trace.h index d7a3ba4dc..df9b3cb7f 100755 --- a/pvpanic/pvpanic/trace.h +++ b/pvpanic/pvpanic/trace.h @@ -62,4 +62,3 @@ // FUNC TraceEvents(LEVEL, FLAGS, MSG, ...); // end_wpp // - diff --git a/viocrypt/dll/dllmain.c b/viocrypt/dll/dllmain.c index 69b58914b..1f175313c 100644 --- a/viocrypt/dll/dllmain.c +++ b/viocrypt/dll/dllmain.c @@ -16,4 +16,3 @@ BOOL APIENTRY DllMain( HMODULE hModule, } return TRUE; } - diff --git a/viocrypt/sys/driver.h b/viocrypt/sys/driver.h index ca3c7688e..e02837831 100644 --- a/viocrypt/sys/driver.h +++ b/viocrypt/sys/driver.h @@ -81,6 +81,6 @@ EVT_WDF_INTERRUPT_ISR VioCryptInterruptIsr; EVT_WDF_INTERRUPT_DPC VioCryptInterruptDpc; EVT_WDF_INTERRUPT_ENABLE VioCryptInterruptEnable; EVT_WDF_INTERRUPT_DISABLE VioCryptInterruptDisable; - + EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL VioCryptIoControl; -EVT_WDF_IO_QUEUE_IO_STOP VioCryptIoStop; \ No newline at end of file +EVT_WDF_IO_QUEUE_IO_STOP VioCryptIoStop; diff --git a/viogpu/common/edid.h b/viogpu/common/edid.h index 25734201e..04261e046 100644 --- a/viogpu/common/edid.h +++ b/viogpu/common/edid.h @@ -199,4 +199,4 @@ bool GetStandardTimingResolution(PSTANDARD_TIMING_DESCRIPTOR desc, PVIOGPU_DISP_ bool GetVICResolution(USHORT idx, PVIOGPU_DISP_MODE mode); extern VIOGPU_DISP_MODE gpu_disp_modes[64]; -extern UCHAR g_gpu_edid[EDID_V1_BLOCK_SIZE]; \ No newline at end of file +extern UCHAR g_gpu_edid[EDID_V1_BLOCK_SIZE]; diff --git a/viogpu/common/viogpu.h b/viogpu/common/viogpu.h index f94dd4aad..61b193812 100755 --- a/viogpu/common/viogpu.h +++ b/viogpu/common/viogpu.h @@ -311,4 +311,3 @@ typedef struct _COLOR_CHARACTERISTICS { #define ISR_REASON_DISPLAY 1 #define ISR_REASON_CURSOR 2 #define ISR_REASON_CHANGE 4 - diff --git a/viogpu/common/viogpu_pci.h b/viogpu/common/viogpu_pci.h index fd09b4b2e..25f4a2f5d 100755 --- a/viogpu/common/viogpu_pci.h +++ b/viogpu/common/viogpu_pci.h @@ -117,4 +117,3 @@ NTSTATUS UnmapFrameBuffer( _In_reads_bytes_(Length) VOID* VirtualAddress, _In_ ULONG Length); - diff --git a/viogpu/common/viogpu_queue.h b/viogpu/common/viogpu_queue.h index e3f4fa93b..b218d2926 100755 --- a/viogpu/common/viogpu_queue.h +++ b/viogpu/common/viogpu_queue.h @@ -126,7 +126,7 @@ class VioGpuQueue VioGpuQueue(); ~VioGpuQueue(); BOOLEAN Init( - _In_ VirtIODevice* pVIODevice, + _In_ VirtIODevice* pVIODevice, _In_ struct virtqueue* pVirtQueue, _In_ UINT index); void Close(void); @@ -201,4 +201,3 @@ class CrsrQueue : public VioGpuQueue UINT QueueCursor(PGPU_VBUFFER buf); PGPU_VBUFFER DequeueCursor(_Out_ UINT* len); }; - diff --git a/viogpu/viogpudo/driver.cpp b/viogpu/viogpudo/driver.cpp index ced2431f5..17affeae0 100755 --- a/viogpu/viogpudo/driver.cpp +++ b/viogpu/viogpudo/driver.cpp @@ -716,4 +716,3 @@ void DebugPrintFuncKdPrint(const char *format, ...) #endif #pragma code_seg(pop) // End Non-Paged Code - diff --git a/viogpu/viogpudo/driver.h b/viogpu/viogpudo/driver.h index 76f71a5d4..a3002be84 100755 --- a/viogpu/viogpudo/driver.h +++ b/viogpu/viogpudo/driver.h @@ -218,4 +218,3 @@ VioGpuDodSystemDisplayWrite( _In_ UINT SourceStride, _In_ UINT PositionX, _In_ UINT PositionY); - diff --git a/viogpu/viogpudo/viogpudo.h b/viogpu/viogpudo/viogpudo.h index a705471c3..2128bf3b1 100755 --- a/viogpu/viogpudo/viogpudo.h +++ b/viogpu/viogpudo/viogpudo.h @@ -319,4 +319,3 @@ class VioGpuDod { NTSTATUS GetRegisterInfo(void); VOID BuildVideoSignalInfo(D3DKMDT_VIDEO_SIGNAL_INFO* pVideoSignalInfo, PVIDEO_MODE_INFORMATION pModeInfo); }; - diff --git a/viomem/sys/Device.c b/viomem/sys/Device.c index 29bc11e56..99a235e7f 100644 --- a/viomem/sys/Device.c +++ b/viomem/sys/Device.c @@ -124,7 +124,7 @@ ViomemDeviceAdd( memset(&devCtx->MemoryConfiguration, 0, sizeof(devCtx->MemoryConfiguration)); devCtx->finishProcessing = FALSE; - + KeInitializeEvent(&devCtx->hostAcknowledge, SynchronizationEvent, FALSE); WDF_OBJECT_ATTRIBUTES_INIT(&attributes); @@ -192,7 +192,7 @@ ViomemEvtDevicePrepareHardware( ResourceListTranslated, NULL, VIRTIO_MEM_POOL_TAG); - + if (!NT_SUCCESS(status)) { TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "VirtIOWdfInitialize failed with %x\n", status); @@ -234,8 +234,8 @@ ViomemEvtDevicePrepareHardware( TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "Failed to allocate MemoryResponse block\n"); status = STATUS_INSUFFICIENT_RESOURCES; } - - RtlFillMemory(&devCtx->memoryBitmapHandle, sizeof(RTL_BITMAP), 0); + + RtlFillMemory(&devCtx->memoryBitmapHandle, sizeof(RTL_BITMAP), 0); devCtx->bitmapBuffer = NULL; // @@ -281,7 +281,7 @@ ViomemEvtDeviceReleaseHardware ( return STATUS_SUCCESS; } -NTSTATUS +NTSTATUS ViomemCreateWorkerThread( IN WDFDEVICE Device ) @@ -296,7 +296,7 @@ ViomemCreateWorkerThread( if(devCtx->Thread == NULL) { - InitializeObjectAttributes(&oa, NULL, + InitializeObjectAttributes(&oa, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); status = PsCreateSystemThread(&hThread, THREAD_ALL_ACCESS, &oa, NULL, NULL, @@ -379,14 +379,14 @@ ViomemEvtDeviceD0Entry( { TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP, "ViomemCreateWorkerThread failed with status 0x%08x\n", status); - } + } TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT, "%s Return \n", __FUNCTION__); return status; } -NTSTATUS +NTSTATUS ViomemEvtDeviceD0Exit( IN WDFDEVICE Device, IN WDF_POWER_DEVICE_STATE TargetState @@ -401,13 +401,13 @@ ViomemEvtDeviceD0Exit( PAGED_CODE(); ViomemTerminate(Device); - + TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT, "%s Return\n", __FUNCTION__); return STATUS_SUCCESS; } -NTSTATUS +NTSTATUS ViomemEvtDeviceD0ExitPreInterruptsDisabled( IN WDFDEVICE Device, IN WDF_POWER_DEVICE_STATE TargetState @@ -429,7 +429,7 @@ ViomemEvtDeviceD0ExitPreInterruptsDisabled( return STATUS_SUCCESS; } -BOOLEAN +BOOLEAN ViomemISR( IN WDFINTERRUPT WdfInterrupt, IN ULONG MessageID @@ -455,7 +455,7 @@ ViomemISR( return FALSE; } -VOID +VOID ViomemDPC( IN WDFINTERRUPT WdfInterrupt, IN WDFOBJECT WdfDevice @@ -471,7 +471,7 @@ ViomemDPC( TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT, "%s Entry\n", __FUNCTION__); WdfSpinLockAcquire(devCtx->infVirtQueueLock); - + if (virtqueue_has_buf(devCtx->infVirtQueue)) { bHostAck = TRUE; @@ -491,7 +491,7 @@ ViomemDPC( TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT, "%s Return\n", __FUNCTION__); } -NTSTATUS +NTSTATUS ViomemEnableInterrupts( IN WDFINTERRUPT WdfInterrupt, IN WDFDEVICE WdfDevice @@ -509,7 +509,7 @@ ViomemEnableInterrupts( return STATUS_SUCCESS; } -NTSTATUS +NTSTATUS ViomemDisableInterrupts( IN WDFINTERRUPT WdfInterrupt, IN WDFDEVICE WdfDevice @@ -526,4 +526,3 @@ ViomemDisableInterrupts( TraceEvents(TRACE_LEVEL_VERBOSE, DBG_INIT, "%s Return\n", __FUNCTION__); return STATUS_SUCCESS; } - diff --git a/viomem/sys/precomp.h b/viomem/sys/precomp.h index 0eb24f236..f56bc29af 100644 --- a/viomem/sys/precomp.h +++ b/viomem/sys/precomp.h @@ -49,4 +49,3 @@ #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif - diff --git a/viomem/sys/viomem.h b/viomem/sys/viomem.h index bc3d60f35..dd540040f 100644 --- a/viomem/sys/viomem.h +++ b/viomem/sys/viomem.h @@ -31,7 +31,7 @@ #pragma once #include "virtio.h" -// +// // Types and defines taken directly from the Linux header file. // @@ -173,4 +173,3 @@ typedef struct _virtio_mem_resp { #define VIRTIO_MEM_STATE_UNPLUGGED 1 /* State of memory blocks is "mixed" */ #define VIRTIO_MEM_STATE_MIXED 2 - diff --git a/vioscsi/resources.h b/vioscsi/resources.h index 783e373d5..ca80ef2a4 100644 --- a/vioscsi/resources.h +++ b/vioscsi/resources.h @@ -50,4 +50,3 @@ #define CLUSDISK L"CLUSDISK" #define HBA_ID 1234567890987654321ULL #endif //___RESOURCES_H__ - diff --git a/vioserial/app/device.h b/vioserial/app/device.h index d1123df0f..c916af062 100644 --- a/vioserial/app/device.h +++ b/vioserial/app/device.h @@ -34,4 +34,3 @@ class CDevice { }; #endif - diff --git a/vioserial/app/notifier.h b/vioserial/app/notifier.h index 2dda28ee7..a99993e78 100644 --- a/vioserial/app/notifier.h +++ b/vioserial/app/notifier.h @@ -32,4 +32,3 @@ class CNotifier { }; #endif - diff --git a/vioserial/app/win/sys/socket.h b/vioserial/app/win/sys/socket.h index 9ae6da655..4140b262d 100644 --- a/vioserial/app/win/sys/socket.h +++ b/vioserial/app/win/sys/socket.h @@ -5,4 +5,4 @@ #define SOCK_STREAM 1 /* stream socket */ #define AF_UNIX 1 /* local to host (pipes, portals) */ -typedef size_t socklen_t; \ No newline at end of file +typedef size_t socklen_t; diff --git a/vioserial/app/win/sys/time.h b/vioserial/app/win/sys/time.h index 69607c3d8..2a187fa4e 100644 --- a/vioserial/app/win/sys/time.h +++ b/vioserial/app/win/sys/time.h @@ -3,4 +3,4 @@ #define clock_gettime(x, data) ((timespec_get(data, TIME_UTC) != 0) ? 0 : 1) -#endif \ No newline at end of file +#endif diff --git a/vioserial/lib/PnPAll.h b/vioserial/lib/PnPAll.h index fcab724eb..1fa4fd371 100644 --- a/vioserial/lib/PnPAll.h +++ b/vioserial/lib/PnPAll.h @@ -156,4 +156,3 @@ class SerialPort : public IPnPEventObserver virtual void handleEvent(const PnPControl& ref); pair NotificationPair; }; - diff --git a/vioserial/lib/port.cpp b/vioserial/lib/port.cpp index b46fe2e9f..45f151819 100644 --- a/vioserial/lib/port.cpp +++ b/vioserial/lib/port.cpp @@ -241,4 +241,3 @@ void SerialPort::handleEvent(const PnPControl& ref) break; } } - diff --git a/vioserial/lib/stdafx.h b/vioserial/lib/stdafx.h index 5c8bb699d..db32e6052 100644 --- a/vioserial/lib/stdafx.h +++ b/vioserial/lib/stdafx.h @@ -21,5 +21,3 @@ #include "PnPAll.h" #include "vioser.h" - - diff --git a/vioserial/sys/Driver.c b/vioserial/sys/Driver.c index 360c8e62e..29c02a95d 100755 --- a/vioserial/sys/Driver.c +++ b/vioserial/sys/Driver.c @@ -117,4 +117,3 @@ VIOSerialEvtDriverContextCleanup( WPP_CLEANUP( WdfDriverWdmGetDriverObject((WDFDRIVER)Driver) ); } - diff --git a/vioserial/sys/IsrDpc.c b/vioserial/sys/IsrDpc.c index faf667ce1..69f234f2a 100644 --- a/vioserial/sys/IsrDpc.c +++ b/vioserial/sys/IsrDpc.c @@ -199,4 +199,3 @@ VIOSerialDisableInterruptQueue(IN struct virtqueue *vq) TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INTERRUPT, "<-- %s\n", __FUNCTION__); } - diff --git a/vioserial/sys/trace.h b/vioserial/sys/trace.h index 876711ac0..61d0d2d9d 100755 --- a/vioserial/sys/trace.h +++ b/vioserial/sys/trace.h @@ -119,4 +119,3 @@ else VirtioDebugPrintProc(message, __VA_ARGS__) #endif void InitializeDebugPrints(IN PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); - diff --git a/viosock/sys/Driver.c b/viosock/sys/Driver.c index 35914b30f..6a1f10a51 100644 --- a/viosock/sys/Driver.c +++ b/viosock/sys/Driver.c @@ -138,4 +138,4 @@ VIOSockTimerStart( pTimer->Timeout = Timeout; WdfTimerStart(pTimer->Timer, -Timeout); } -} \ No newline at end of file +} diff --git a/viosock/sys/Socket.c b/viosock/sys/Socket.c index f5ca6e7af..af0ae9ca7 100644 --- a/viosock/sys/Socket.c +++ b/viosock/sys/Socket.c @@ -1880,7 +1880,7 @@ VIOSockEventRegister( pSocket->EventsMask = lNetworkEvents; if (pSocket->EventObject) ObDereferenceObject(pSocket->EventObject); - + pSocket->EventObject = pEvent; if (pSocket->EventObject && (pSocket->Events & pSocket->EventsMask) != 0) KeSetEvent(pSocket->EventObject, IO_NO_INCREMENT, FALSE); @@ -2778,4 +2778,3 @@ VIOSockHandleTransportReset( TraceEvents(TRACE_LEVEL_VERBOSE, DBG_HW_ACCESS, "<-- %s\n", __FUNCTION__); } - diff --git a/viosock/sys/Tx.c b/viosock/sys/Tx.c index 11c6c92d1..371119161 100644 --- a/viosock/sys/Tx.c +++ b/viosock/sys/Tx.c @@ -1125,4 +1125,4 @@ VIOSockTxTimerFunc( } TraceEvents(TRACE_LEVEL_VERBOSE, DBG_WRITE, "<-- %s\n", __FUNCTION__); -} \ No newline at end of file +} diff --git a/viosock/viosock-wsk-test/viosockwsk-test.c b/viosock/viosock-wsk-test/viosockwsk-test.c index 999b758a7..348b602e8 100644 --- a/viosock/viosock-wsk-test/viosockwsk-test.c +++ b/viosock/viosock-wsk-test/viosockwsk-test.c @@ -161,7 +161,7 @@ _TestSocket( DEBUG_ENTER_FUNCTION("Socket=0x%p; Irp=0x%p; HashObject=0x%p; Server=%u; TestFlags=0x%x", Socket, Irp, HashObject, Server, TestFlags); memset(&iosb, 0, sizeof(iosb)); - KeInitializeEvent(&event, NotificationEvent, FALSE); + KeInitializeEvent(&event, NotificationEvent, FALSE); for (size_t i = 0; i < TEST_COUNT; ++i) { if (!NT_SUCCESS(iosb.Status)) @@ -204,7 +204,7 @@ _TestSocket( if ((TestFlags & VIOWSK_TEST_FLAG_SENDEX) != 0) WSK_SYNCHRONOUS_CALL(Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)Socket->Dispatch)->WskSendEx(Socket, &msg, 0, 0, NULL, Irp), &iosb); else WSK_SYNCHRONOUS_CALL(Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)Socket->Dispatch)->WskSend(Socket, &msg, 0, Irp), &iosb); - + if (iosb.Status == STATUS_CANT_WAIT) { LARGE_INTEGER timeout; @@ -214,7 +214,7 @@ _TestSocket( KeDelayExecutionThread(KernelMode, FALSE, &timeout); if (InterlockedCompareExchange(TerminationFlag, 1, 1)) break; - + iosb.Status = STATUS_SUCCESS; continue; } @@ -235,8 +235,8 @@ _TestSocket( if ((TestFlags & VIOWSK_TEST_FLAG_RECVEX) != 0) WSK_SYNCHRONOUS_CALL(Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)Socket->Dispatch)->WskReceiveEx(Socket, &recvMsg, 0, NULL, NULL, NULL, Irp), &iosb); else WSK_SYNCHRONOUS_CALL(Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)Socket->Dispatch)->WskReceive(Socket, &recvMsg, 0, Irp), &iosb); - - if (iosb.Status == STATUS_CANT_WAIT) + + if (iosb.Status == STATUS_CANT_WAIT) { LARGE_INTEGER timeout; @@ -249,7 +249,7 @@ _TestSocket( iosb.Status = STATUS_SUCCESS; continue; } - + if (!NT_SUCCESS(iosb.Status) || recvMsg.Length != iosb.Information) { DEBUG_ERROR("Unable to receive the tes message: 0x%x (%Iu bytes length, %Iu bytes received)", iosb.Status, recvMsg.Length, iosb.Information); @@ -283,7 +283,7 @@ _TestSocket( if ((TestFlags & VIOWSK_TEST_FLAG_SENDEX) != 0) WSK_SYNCHRONOUS_CALL(Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)Socket->Dispatch)->WskSendEx(Socket, &msg, 0, 0, NULL, Irp), &iosb); else WSK_SYNCHRONOUS_CALL(Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)Socket->Dispatch)->WskSend(Socket, &msg, 0, Irp), &iosb); - + if (iosb.Status == STATUS_CANT_WAIT) { LARGE_INTEGER timeout; @@ -376,7 +376,7 @@ _TestThreadRoutine( WSK_SYNCHRONOUS_CALL(ctx->Irp, &event, ((PWSK_PROVIDER_CONNECTION_DISPATCH)ctx->Socket->Dispatch)->WskDisconnect(ctx->Socket, &ctx->FarewellMsg, 0, ctx->Irp), &iosb); if (iosb.Status == STATUS_CONNECTION_INVALID) iosb.Status = STATUS_SUCCESS; - + if (!NT_SUCCESS(iosb.Status)) { DEBUG_ERROR("Unable to disconnect the server socket: 0x%x", iosb.Status); @@ -425,7 +425,7 @@ _ServerThreadRoutine( if (InterlockedIncrement(&_readyThreads) == (CLIENT_THREAD_COUNT + SERVER_THREAD_COUNT)) KeSetEvent(&_initEvent, IO_NO_INCREMENT, FALSE); - + irp = IoAllocateIrp(1, FALSE); if (!irp) { iosb.Status = STATUS_INSUFFICIENT_RESOURCES; @@ -490,12 +490,12 @@ _ServerThreadRoutine( KeDelayExecutionThread(KernelMode, FALSE, &timeout); continue; } - + if (!NT_SUCCESS(iosb.Status)) { DEBUG_ERROR("Unable to accept: 0x%x", iosb.Status); break; } - + clientSocket = (PWSK_SOCKET)iosb.Information; WSK_SYNCHRONOUS_CALL(irp, &event, ((PWSK_PROVIDER_LISTEN_DISPATCH)clientSocket->Dispatch)->WskControlSocket(clientSocket, WskIoctl, FIONBIO, 0, sizeof(nonBlocking), &nonBlocking, 0, NULL, NULL, irp), &iosb); if (!NT_SUCCESS(iosb.Status)) { @@ -533,7 +533,7 @@ _ServerThreadRoutine( while (!IsListEmpty(&threadListHead)) { PTEST_THREAD_CONTEXT ctx = CONTAINING_RECORD(threadListHead.Flink, TEST_THREAD_CONTEXT, Entry); - + RemoveEntryList(&ctx->Entry); InitializeListHead(&ctx->Entry); KeReleaseSpinLock(&threadListLock, irql); @@ -544,7 +544,7 @@ _ServerThreadRoutine( IoFreeIrp(ctx->Irp); if (ctx->FarewellMsgFlat) VioWskMessageFree(&ctx->FarewellMsg, ctx->FarewellMsgFlat); - + VIoWskMessageDestroyHashObject(&ctx->Hash); ExFreePoolWithTag(ctx, VIOWSK_TEST_TAG); KeAcquireSpinLock(&threadListLock, &irql); @@ -733,7 +733,7 @@ _ClientThreadRoutine( testStatus = iosb.Status; DEBUG_ERROR("Client socket disconnect failed: 0x%x", iosb.Status); } - } else + } else { testStatus = iosb.Status; DEBUG_ERROR("Unable to connect to the server: 0x%x", iosb.Status); @@ -752,7 +752,7 @@ _ClientThreadRoutine( KeDelayExecutionThread(KernelMode, FALSE, &timeout); } - + IoFreeIrp(irp); FreeHashObject: VIoWskMessageDestroyHashObject(&ho); @@ -900,7 +900,7 @@ _SocketTestThreadCreate( { if (ctx->FarewellMsgFlat) VioWskMessageFree(&ctx->FarewellMsg, ctx->FarewellMsgFlat); - + VIoWskMessageDestroyHashObject(&ctx->Hash); } FreeCtx: @@ -1013,4 +1013,4 @@ DriverEntry( DEBUG_EXIT_FUNCTION("0x%x", Status); return Status; -} \ No newline at end of file +} diff --git a/viosock/wsk/wsk-utils.c b/viosock/wsk/wsk-utils.c index dee1886ac..92678fd0f 100644 --- a/viosock/wsk/wsk-utils.c +++ b/viosock/wsk/wsk-utils.c @@ -301,7 +301,7 @@ VioWskSocketBuildIOCTL( if (InputBufferLength != 0 || OutputBufferLength != 0) { IOCTLIrp->AssociatedIrp.SystemBuffer = ExAllocatePoolUninitialized( - NonPagedPool, + NonPagedPool, InputBufferLength > OutputBufferLength ? InputBufferLength : OutputBufferLength, VIOSOCK_WSK_MEMORY_TAG); @@ -446,7 +446,7 @@ VioWskSocketReadWrite( WskCompContextDereference(CompContext); if (NT_SUCCESS(Status)) OpIrp = NULL; - + Irp = NULL; FreeOpIrp: @@ -582,7 +582,7 @@ WskBufferValidate( if (mdl == Buffer->Mdl) *FirstMdlLength = effectiveLength; - + mdl = mdl->Next; length -= effectiveLength; if (length == 0 || mdl == NULL) @@ -603,4 +603,3 @@ WskBufferValidate( DEBUG_EXIT_FUNCTION("0x%x, *FirstMdlLength=%u, *LastMdlLength=%u", status, *FirstMdlLength, *LastMdlLength); return status; } - diff --git a/viostor/virtio_stor_utils.h b/viostor/virtio_stor_utils.h index 1cb803629..5807ba78a 100755 --- a/viostor/virtio_stor_utils.h +++ b/viostor/virtio_stor_utils.h @@ -49,4 +49,3 @@ LogError( ); #endif ___VIOSTOR_UTILS_H___ -