From f622f7ffe92220faa3da835db5afa3dd4cf4918a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 8 Mar 2026 17:39:00 +0100 Subject: [PATCH] [VIDEOPRT] Minor formatting changes --- win32ss/drivers/videoprt/dispatch.c | 13 +++++++------ win32ss/drivers/videoprt/videoprt.c | 24 +++++++++--------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/win32ss/drivers/videoprt/dispatch.c b/win32ss/drivers/videoprt/dispatch.c index cf2116babcc..22b89830e82 100644 --- a/win32ss/drivers/videoprt/dispatch.c +++ b/win32ss/drivers/videoprt/dispatch.c @@ -339,10 +339,10 @@ IntVideoPortAddDevice( PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - /* Get the initialization data we saved in VideoPortInitialize. */ + /* Get the initialization data we saved in VideoPortInitialize */ DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); - /* Create adapter device object. */ + /* Create adapter device object */ Status = IntVideoPortCreateAdapterDeviceObject(DriverObject, DriverExtension, PhysicalDeviceObject, @@ -902,12 +902,12 @@ IntVideoPortPnPStartDevice( PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; PCM_RESOURCE_LIST AllocatedResources; - /* Get the initialization data we saved in VideoPortInitialize.*/ + /* Get the initialization data we saved in VideoPortInitialize */ DriverObject = DeviceObject->DriverObject; DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - /* Store some resources in the DeviceExtension. */ + /* Store some resources in the DeviceExtension */ AllocatedResources = Stack->Parameters.StartDevice.AllocatedResources; if (AllocatedResources != NULL) { @@ -935,7 +935,8 @@ IntVideoPortPnPStartDevice( FullList = AllocatedResources->List; ASSERT(AllocatedResources->Count == 1); INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n", - FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision); + FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, + FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision); /* FIXME: Is this ASSERT ok for resources from the PNP manager? */ ASSERT(FullList->InterfaceType == PCIBus); @@ -962,7 +963,7 @@ IntVideoPortPnPStartDevice( DeviceExtension->InterruptLevel, DeviceExtension->InterruptVector); - /* Create adapter device object. */ + /* Create adapter device object */ return IntVideoPortFindAdapter(DriverObject, DriverExtension, DeviceObject); diff --git a/win32ss/drivers/videoprt/videoprt.c b/win32ss/drivers/videoprt/videoprt.c index 6c1246f3c9d..a9ac7df0860 100644 --- a/win32ss/drivers/videoprt/videoprt.c +++ b/win32ss/drivers/videoprt/videoprt.c @@ -477,11 +477,11 @@ IntVideoPortFindAdapter( // FIXME: Check the adapter key and update VideoDebugLevel variable. /* - * Call miniport HwVidFindAdapter entry point to detect if - * particular device is present. There are two possible code - * paths. The first one is for Legacy drivers (NT4) and cases - * when we don't have information about what bus we're on. The - * second case is the standard one for Plug & Play drivers. + * Call the miniport HwVidFindAdapter entry point to detect if this + * particular device is present. There are two possible code paths. + * The first one is for Legacy drivers (NT4) and cases when we don't + * have information about what bus we're on. The second case is the + * standard one for Plug & Play drivers. */ if (DeviceExtension->PhysicalDeviceObject == NULL) { @@ -541,13 +541,9 @@ IntVideoPortFindAdapter( &Again); if (vpStatus == ERROR_DEV_NOT_EXIST) - { continue; - } else - { break; - } } } else @@ -1035,8 +1031,7 @@ VideoPortInitialize( } /* - * NOTE: - * The driver extension can be already allocated in case that we were + * NOTE: The driver extension can be already allocated in case we were * called by legacy driver and failed detecting device. Some miniport * drivers in that case adjust parameters and call VideoPortInitialize * again. @@ -1047,7 +1042,7 @@ VideoPortInitialize( Status = IoAllocateDriverObjectExtension(DriverObject, DriverObject, sizeof(VIDEO_PORT_DRIVER_EXTENSION), - (PVOID *)&DriverExtension); + (PVOID*)&DriverExtension); if (!NT_SUCCESS(Status)) { ERR_(VIDEOPRT, "IoAllocateDriverObjectExtension failed 0x%x\n", Status); @@ -1091,12 +1086,11 @@ VideoPortInitialize( } } - /* Copy the correct miniport initialization data to the device extension. */ + /* Copy the correct miniport initialization data to the device extension */ RtlCopyMemory(&DriverExtension->InitializationData, HwInitializationData, HwInitializationData->HwInitDataSize); - if (HwInitializationData->HwInitDataSize < - sizeof(VIDEO_HW_INITIALIZATION_DATA)) + if (HwInitializationData->HwInitDataSize < sizeof(VIDEO_HW_INITIALIZATION_DATA)) { RtlZeroMemory((PVOID)((ULONG_PTR)&DriverExtension->InitializationData + HwInitializationData->HwInitDataSize),