summaryrefslogtreecommitdiff
path: root/Kernel/Bus/PCI
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Bus/PCI')
-rw-r--r--Kernel/Bus/PCI/Definitions.h2
-rw-r--r--Kernel/Bus/PCI/DeviceController.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Bus/PCI/Definitions.h b/Kernel/Bus/PCI/Definitions.h
index 08edcf6cc9..f2ec09dd0c 100644
--- a/Kernel/Bus/PCI/Definitions.h
+++ b/Kernel/Bus/PCI/Definitions.h
@@ -198,7 +198,7 @@ public:
, m_capabilities(capabilities)
{
if constexpr (PCI_DEBUG) {
- for (auto capability : capabilities)
+ for (const auto& capability : capabilities)
dbgln("{} has capability {}", address, capability.id());
}
}
diff --git a/Kernel/Bus/PCI/DeviceController.cpp b/Kernel/Bus/PCI/DeviceController.cpp
index 7dd396dc0b..8e0705b1e5 100644
--- a/Kernel/Bus/PCI/DeviceController.cpp
+++ b/Kernel/Bus/PCI/DeviceController.cpp
@@ -16,7 +16,7 @@ DeviceController::DeviceController(Address address)
bool DeviceController::is_msi_capable() const
{
- for (auto capability : PCI::get_physical_id(pci_address()).capabilities()) {
+ for (const auto& capability : PCI::get_physical_id(pci_address()).capabilities()) {
if (capability.id() == PCI_CAPABILITY_MSI)
return true;
}
@@ -24,7 +24,7 @@ bool DeviceController::is_msi_capable() const
}
bool DeviceController::is_msix_capable() const
{
- for (auto capability : PCI::get_physical_id(pci_address()).capabilities()) {
+ for (const auto& capability : PCI::get_physical_id(pci_address()).capabilities()) {
if (capability.id() == PCI_CAPABILITY_MSIX)
return true;
}