From 02b59d168de5812730fda9e0642302d1e3b25877 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 13:34:41 -0700 Subject: Bump tj-actions/changed-files from 41 to 46 in /.github/workflows (#1283) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41 to 46. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v41...v46) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/Code-Scanning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Code-Scanning.yml b/.github/workflows/Code-Scanning.yml index 63e155c9..1364bfbd 100644 --- a/.github/workflows/Code-Scanning.yml +++ b/.github/workflows/Code-Scanning.yml @@ -48,7 +48,7 @@ jobs: run: nuget restore .\packages.config -PackagesDirectory .\packages\ - name: Get changed files id: get-changed-files - uses: tj-actions/changed-files@v41 + uses: tj-actions/changed-files@v46 with: separator: "," - name: Initialize CodeQL -- cgit v1.3.1 From a8a0f37009585aa2d04334f13c6806aee5cc8274 Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Mon, 23 Jun 2025 00:27:33 -0700 Subject: add explicit cast --- storage/class/disk/src/disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/class/disk/src/disk.c b/storage/class/disk/src/disk.c index c8dbeb59..ce3395f7 100644 --- a/storage/class/disk/src/disk.c +++ b/storage/class/disk/src/disk.c @@ -707,7 +707,7 @@ Return Value: mediaTypes->MediaInfoCount = 1; mediaInfo->DeviceSpecific.DiskInfo.Cylinders.QuadPart = fdoExtension->DiskGeometry.Cylinders.QuadPart; - mediaInfo->DeviceSpecific.DiskInfo.MediaType = FixedMedia; + mediaInfo->DeviceSpecific.DiskInfo.MediaType = (STORAGE_MEDIA_TYPE)FixedMedia; mediaInfo->DeviceSpecific.DiskInfo.TracksPerCylinder = fdoExtension->DiskGeometry.TracksPerCylinder; mediaInfo->DeviceSpecific.DiskInfo.SectorsPerTrack = fdoExtension->DiskGeometry.SectorsPerTrack; mediaInfo->DeviceSpecific.DiskInfo.BytesPerSector = fdoExtension->DiskGeometry.BytesPerSector; @@ -899,7 +899,7 @@ SkipTable: mediaTypes->MediaInfoCount = 1; mediaInfo->DeviceSpecific.RemovableDiskInfo.Cylinders.QuadPart = fdoExtension->DiskGeometry.Cylinders.QuadPart; - mediaInfo->DeviceSpecific.RemovableDiskInfo.MediaType = RemovableMedia; + mediaInfo->DeviceSpecific.RemovableDiskInfo.MediaType = (STORAGE_MEDIA_TYPE)RemovableMedia; mediaInfo->DeviceSpecific.RemovableDiskInfo.TracksPerCylinder = fdoExtension->DiskGeometry.TracksPerCylinder; mediaInfo->DeviceSpecific.RemovableDiskInfo.SectorsPerTrack = fdoExtension->DiskGeometry.SectorsPerTrack; mediaInfo->DeviceSpecific.RemovableDiskInfo.BytesPerSector = fdoExtension->DiskGeometry.BytesPerSector; -- cgit v1.3.1 From a4440c5da6d6bcd99b0ac576651117e2daffa50f Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Mon, 23 Jun 2025 01:16:35 -0700 Subject: inf update for stampif --- storage/miniports/lsi_u3/src/lsi_u3.inf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/miniports/lsi_u3/src/lsi_u3.inf b/storage/miniports/lsi_u3/src/lsi_u3.inf index 5a879f51..b30a8044 100644 --- a/storage/miniports/lsi_u3/src/lsi_u3.inf +++ b/storage/miniports/lsi_u3/src/lsi_u3.inf @@ -37,8 +37,9 @@ lsi_u3.sys = 1 DefaultDestDir = 12 ; DIRID_DRIVERS [Manufacturer] -%LSI%=LSI,NTamd64,NTia64,NTarm64 +%LSI%=LSI,NT$ARCH$ +;One of the following sections will be used based on $ARCH$. Template INF. [LSI.NTamd64] %DevDesc1% = LSI_U3_Inst, PCI\VEN_1000&DEV_0020 %DevDesc2% = LSI_U3_Inst, PCI\VEN_1000&DEV_0021 -- cgit v1.3.1 From f79d24e9a46698f0666130bd41edb133f220a2da Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Mon, 23 Jun 2025 02:13:13 -0700 Subject: other classpnp and disk fixes --- storage/class/classpnp/src/class.c | 6 +++--- storage/class/classpnp/src/obsolete.c | 6 +++--- storage/class/disk/src/diskwmi.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/storage/class/classpnp/src/class.c b/storage/class/classpnp/src/class.c index 58d1835a..6da2b146 100644 --- a/storage/class/classpnp/src/class.c +++ b/storage/class/classpnp/src/class.c @@ -3740,7 +3740,7 @@ ClassIoComplete( PSCSI_REQUEST_BLOCK srb = Context; PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension; PCLASS_PRIVATE_FDO_DATA fdoData = fdoExtension->PrivateFdoData; - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; BOOLEAN retry; BOOLEAN callStartNextPacket; ULONG srbFlags; @@ -6055,7 +6055,7 @@ __ClassInterpretSenseInfo_ProcessingInvalidSenseBuffer: logErrorInternal = FALSE; logError = FALSE; } else if (cdbOpcode == SCSIOP_MODE_SENSE10) { - USHORT allocationLength; + USHORT allocationLength = 0; REVERSE_BYTES_SHORT(&(cdb->MODE_SENSE10.AllocationLength), &allocationLength); if (SrbGetDataTransferLength(Srb) <= allocationLength) { *Status = STATUS_SUCCESS; @@ -6063,7 +6063,7 @@ __ClassInterpretSenseInfo_ProcessingInvalidSenseBuffer: logError = FALSE; } } else if (ClasspIsReceiveTokenInformation(cdb)) { - ULONG allocationLength; + ULONG allocationLength = 0; REVERSE_BYTES(&(cdb->RECEIVE_TOKEN_INFORMATION.AllocationLength), &allocationLength); if (SrbGetDataTransferLength(Srb) <= allocationLength) { *Status = STATUS_SUCCESS; diff --git a/storage/class/classpnp/src/obsolete.c b/storage/class/classpnp/src/obsolete.c index aeeef81d..e0fe3d13 100644 --- a/storage/class/classpnp/src/obsolete.c +++ b/storage/class/classpnp/src/obsolete.c @@ -119,7 +119,7 @@ ClassIoCompleteAssociated( PIRP originalIrp = Irp->AssociatedIrp.MasterIrp; LONG irpCount; - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; BOOLEAN retry; TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_GENERAL, "ClassIoCompleteAssociated is OBSOLETE !")); @@ -390,8 +390,8 @@ RetryRequest( // NT_ASSERT(SrbGetDataBuffer(srbHeader) == MmGetMdlVirtualAddress(Irp->MdlAddress)); - _Analysis_assume_(Irp->MdlAddress->ByteCount <= dataTransferLength); - transferByteCount = Irp->MdlAddress->ByteCount; + _Analysis_assume_(MmGetMdlByteCount(Irp->MdlAddress) <= dataTransferLength); + transferByteCount = MmGetMdlByteCount(Irp->MdlAddress); } else { diff --git a/storage/class/disk/src/diskwmi.c b/storage/class/disk/src/diskwmi.c index 7503e5a1..de2d7eee 100644 --- a/storage/class/disk/src/diskwmi.c +++ b/storage/class/disk/src/diskwmi.c @@ -1739,7 +1739,7 @@ DiskInfoExceptionComplete( // // Reset byte count of transfer in SRB Extension. // - srbEx->DataTransferLength = Irp->MdlAddress->ByteCount; + srbEx->DataTransferLength = MmGetMdlByteCount(Irp->MdlAddress); // // Zero SRB statuses. @@ -1768,7 +1768,7 @@ DiskInfoExceptionComplete( // // Reset byte count of transfer in SRB Extension. // - srb->DataTransferLength = Irp->MdlAddress->ByteCount; + srb->DataTransferLength = MmGetMdlByteCount(Irp->MdlAddress); // // Zero SRB statuses. -- cgit v1.3.1 From 436e19727b4b7649081767dceea2ea7c737249ee Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Mon, 23 Jun 2025 02:22:41 -0700 Subject: comment update --- storage/miniports/lsi_u3/src/lsi_u3.inf | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/miniports/lsi_u3/src/lsi_u3.inf b/storage/miniports/lsi_u3/src/lsi_u3.inf index b30a8044..692e7adc 100644 --- a/storage/miniports/lsi_u3/src/lsi_u3.inf +++ b/storage/miniports/lsi_u3/src/lsi_u3.inf @@ -36,6 +36,7 @@ lsi_u3.sys = 1 [DestinationDirs] DefaultDestDir = 12 ; DIRID_DRIVERS +; Use NT$ARCH$ for platform-specific stamping via Stampinf [Manufacturer] %LSI%=LSI,NT$ARCH$ -- cgit v1.3.1 From 25ce3de73016e16f6dbb3b82ef4d69e3d4c4b552 Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Mon, 23 Jun 2025 03:09:01 -0700 Subject: remove unrelated change --- .github/workflows/Code-Scanning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Code-Scanning.yml b/.github/workflows/Code-Scanning.yml index 1364bfbd..63e155c9 100644 --- a/.github/workflows/Code-Scanning.yml +++ b/.github/workflows/Code-Scanning.yml @@ -48,7 +48,7 @@ jobs: run: nuget restore .\packages.config -PackagesDirectory .\packages\ - name: Get changed files id: get-changed-files - uses: tj-actions/changed-files@v46 + uses: tj-actions/changed-files@v41 with: separator: "," - name: Initialize CodeQL -- cgit v1.3.1 From 0fc965e7016e9ebe884d40080cd5ef0084bfaf73 Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Mon, 23 Jun 2025 03:14:04 -0700 Subject: code style --- storage/miniports/lsi_u3/src/lsi_u3.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/miniports/lsi_u3/src/lsi_u3.inf b/storage/miniports/lsi_u3/src/lsi_u3.inf index 692e7adc..a394913f 100644 --- a/storage/miniports/lsi_u3/src/lsi_u3.inf +++ b/storage/miniports/lsi_u3/src/lsi_u3.inf @@ -40,7 +40,7 @@ DefaultDestDir = 12 ; DIRID_DRIVERS [Manufacturer] %LSI%=LSI,NT$ARCH$ -;One of the following sections will be used based on $ARCH$. Template INF. +; One of the following sections will be used based on $ARCH$. Template INF. [LSI.NTamd64] %DevDesc1% = LSI_U3_Inst, PCI\VEN_1000&DEV_0020 %DevDesc2% = LSI_U3_Inst, PCI\VEN_1000&DEV_0021 -- cgit v1.3.1 From 7c01d67dcdafcf2a04bac77d9bd564fda0af4c1d Mon Sep 17 00:00:00 2001 From: Abenezer Tamene Date: Tue, 24 Jun 2025 17:26:15 -0700 Subject: fix validation workflow error --- storage/miniports/lsi_u3/src/lsi_u3.inf | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/storage/miniports/lsi_u3/src/lsi_u3.inf b/storage/miniports/lsi_u3/src/lsi_u3.inf index a394913f..52a4d4df 100644 --- a/storage/miniports/lsi_u3/src/lsi_u3.inf +++ b/storage/miniports/lsi_u3/src/lsi_u3.inf @@ -40,16 +40,7 @@ DefaultDestDir = 12 ; DIRID_DRIVERS [Manufacturer] %LSI%=LSI,NT$ARCH$ -; One of the following sections will be used based on $ARCH$. Template INF. -[LSI.NTamd64] -%DevDesc1% = LSI_U3_Inst, PCI\VEN_1000&DEV_0020 -%DevDesc2% = LSI_U3_Inst, PCI\VEN_1000&DEV_0021 - -[LSI.NTia64] -%DevDesc1% = LSI_U3_Inst, PCI\VEN_1000&DEV_0020 -%DevDesc2% = LSI_U3_Inst, PCI\VEN_1000&DEV_0021 - -[LSI.NTarm64] +[LSI.NT$ARCH$] %DevDesc1% = LSI_U3_Inst, PCI\VEN_1000&DEV_0020 %DevDesc2% = LSI_U3_Inst, PCI\VEN_1000&DEV_0021 -- cgit v1.3.1