From 135568a8182e29a19531ff5de0f77120fbcf8d9b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 8 Apr 2025 09:42:15 +0200 Subject: pci, Device.h: minor tweaks. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/PCI/Device.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dev/kernel/KernelKit/PCI') diff --git a/dev/kernel/KernelKit/PCI/Device.h b/dev/kernel/KernelKit/PCI/Device.h index 2c92ba4f..8f55b7c7 100644 --- a/dev/kernel/KernelKit/PCI/Device.h +++ b/dev/kernel/KernelKit/PCI/Device.h @@ -24,10 +24,9 @@ namespace Kernel::PCI Device() = default; public: - explicit Device(UShort bus, UShort device, UShort function, UInt32 bar); + Device(UShort bus, UShort device, UShort function, UInt32 bar); Device& operator=(const Device&) = default; - Device(const Device&) = default; ~Device(); -- cgit v1.2.3 From 1f6dd86d548ec8194c79bd9e2a8b27991061cd9e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 8 Apr 2025 09:59:08 +0200 Subject: pci, Device.h: use sizeof UInt32 instead of relying on a number. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/PCI/Device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev/kernel/KernelKit/PCI') diff --git a/dev/kernel/KernelKit/PCI/Device.h b/dev/kernel/KernelKit/PCI/Device.h index 8f55b7c7..9b750e43 100644 --- a/dev/kernel/KernelKit/PCI/Device.h +++ b/dev/kernel/KernelKit/PCI/Device.h @@ -42,14 +42,14 @@ namespace Kernel::PCI template UInt Read(UInt bar) { - static_assert(sizeof(T) <= 4, "64-bit PCI addressing is unsupported"); + static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported"); return Read(bar, sizeof(T)); } template void Write(UInt bar, UIntPtr data) { - static_assert(sizeof(T) <= 4, "64-bit PCI addressing is unsupported"); + static_assert(sizeof(T) <= sizeof(UInt32), "64-bit PCI addressing is unsupported"); Write(bar, data, sizeof(T)); } -- cgit v1.2.3