From c9678bda2440423ec55d420aedd9a11d79834649 Mon Sep 17 00:00:00 2001 From: Merry Date: Tue, 21 Feb 2023 21:36:20 +0000 Subject: svc: Fix type consistency (exposed on macOS) --- src/core/hle/kernel/svc/svc_device_address_space.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/hle/kernel/svc/svc_device_address_space.cpp') diff --git a/src/core/hle/kernel/svc/svc_device_address_space.cpp b/src/core/hle/kernel/svc/svc_device_address_space.cpp index f68c0e6a9..ec3143e67 100644 --- a/src/core/hle/kernel/svc/svc_device_address_space.cpp +++ b/src/core/hle/kernel/svc/svc_device_address_space.cpp @@ -76,8 +76,8 @@ constexpr bool IsValidDeviceMemoryPermission(MemoryPermission device_perm) { } Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Handle process_handle, - uint64_t process_address, size_t size, uint64_t device_address, - u32 option) { + uint64_t process_address, uint64_t size, + uint64_t device_address, u32 option) { // Decode the option. const MapDeviceAddressSpaceOption option_pack{option}; const auto device_perm = option_pack.permission; @@ -90,7 +90,7 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han R_UNLESS(size > 0, ResultInvalidSize); R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); - R_UNLESS((process_address == static_cast(process_address)), + R_UNLESS((process_address == static_cast(process_address)), ResultInvalidCurrentMemory); R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); R_UNLESS(reserved == 0, ResultInvalidEnumValue); @@ -116,8 +116,8 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han } Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Handle process_handle, - uint64_t process_address, size_t size, uint64_t device_address, - u32 option) { + uint64_t process_address, uint64_t size, + uint64_t device_address, u32 option) { // Decode the option. const MapDeviceAddressSpaceOption option_pack{option}; const auto device_perm = option_pack.permission; @@ -131,7 +131,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han R_UNLESS(size > 0, ResultInvalidSize); R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); - R_UNLESS((process_address == static_cast(process_address)), + R_UNLESS((process_address == static_cast(process_address)), ResultInvalidCurrentMemory); R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); R_UNLESS(reserved == 0, ResultInvalidEnumValue); @@ -157,7 +157,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han } Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle process_handle, - uint64_t process_address, size_t size, uint64_t device_address) { + uint64_t process_address, uint64_t size, uint64_t device_address) { // Validate input. R_UNLESS(Common::IsAligned(process_address, PageSize), ResultInvalidAddress); R_UNLESS(Common::IsAligned(device_address, PageSize), ResultInvalidAddress); @@ -165,7 +165,7 @@ Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle p R_UNLESS(size > 0, ResultInvalidSize); R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); - R_UNLESS((process_address == static_cast(process_address)), + R_UNLESS((process_address == static_cast(process_address)), ResultInvalidCurrentMemory); // Get the device address space. -- cgit v1.2.3