summaryrefslogtreecommitdiff
path: root/DuetPkg/CpuIoDxe/CpuIo.c
diff options
context:
space:
mode:
Diffstat (limited to 'DuetPkg/CpuIoDxe/CpuIo.c')
-rw-r--r--DuetPkg/CpuIoDxe/CpuIo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/DuetPkg/CpuIoDxe/CpuIo.c b/DuetPkg/CpuIoDxe/CpuIo.c
index e946bd45cd..9e5be46df8 100644
--- a/DuetPkg/CpuIoDxe/CpuIo.c
+++ b/DuetPkg/CpuIoDxe/CpuIo.c
@@ -73,7 +73,7 @@ Returns:
UINTN DestinationStride;
UINTN SourceStride;
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
Stride = (UINTN)1 << Width;
DestinationStride = DestinationStrideFlag ? Stride : 0;
SourceStride = SourceStrideFlag ? Stride : 0;
@@ -305,7 +305,7 @@ Returns:
OutStride = 0;
}
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
//
// Loop for each iteration and move the data
@@ -398,7 +398,7 @@ Returns:
OutStride = 0;
}
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
//
// Loop for each iteration and move the data
@@ -518,7 +518,7 @@ Returns:
Count = 1;
}
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
if (Address - 1 + ((UINTN)1 << Width) * Count > Limit) {
return EFI_UNSUPPORTED;
}