From c65a6b6b2205c64d9224f6f809a0951b9eb26bf8 Mon Sep 17 00:00:00 2001 From: b14ckcat Date: Mon, 25 Apr 2022 10:32:09 -0400 Subject: [PATCH] Kernel: Use C++17 namespace style for nested PCI namespace Adjust the nested namespace formatting in PCI files to use the nicer and more consistent C++17 style. --- Kernel/Bus/PCI/Definitions.h | 5 +---- Kernel/Bus/PCI/Device.cpp | 4 +--- Kernel/Bus/PCI/Device.h | 4 +--- Kernel/Bus/PCI/Initializer.cpp | 4 +--- Kernel/Bus/PCI/Initializer.h | 4 +--- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Kernel/Bus/PCI/Definitions.h b/Kernel/Bus/PCI/Definitions.h index 16a11ed8e1..e2b4c3a3ca 100644 --- a/Kernel/Bus/PCI/Definitions.h +++ b/Kernel/Bus/PCI/Definitions.h @@ -14,9 +14,7 @@ #include #include -namespace Kernel { - -namespace PCI { +namespace Kernel::PCI { enum class HeaderType { Device = 0, @@ -293,7 +291,6 @@ private: class Domain; class Device; -} } diff --git a/Kernel/Bus/PCI/Device.cpp b/Kernel/Bus/PCI/Device.cpp index 058503a133..19cc4b0481 100644 --- a/Kernel/Bus/PCI/Device.cpp +++ b/Kernel/Bus/PCI/Device.cpp @@ -8,8 +8,7 @@ #include #include -namespace Kernel { -namespace PCI { +namespace Kernel::PCI { Device::Device(Address address) : m_pci_address(address) @@ -56,4 +55,3 @@ void Device::disable_extended_message_signalled_interrupts() } } -} diff --git a/Kernel/Bus/PCI/Device.h b/Kernel/Bus/PCI/Device.h index 2b58f58dac..f167e192e1 100644 --- a/Kernel/Bus/PCI/Device.h +++ b/Kernel/Bus/PCI/Device.h @@ -9,8 +9,7 @@ #include #include -namespace Kernel { -namespace PCI { +namespace Kernel::PCI { class Device { public: @@ -37,4 +36,3 @@ private: }; } -} diff --git a/Kernel/Bus/PCI/Initializer.cpp b/Kernel/Bus/PCI/Initializer.cpp index 0357b09689..159948484e 100644 --- a/Kernel/Bus/PCI/Initializer.cpp +++ b/Kernel/Bus/PCI/Initializer.cpp @@ -14,8 +14,7 @@ #include #include -namespace Kernel { -namespace PCI { +namespace Kernel::PCI { READONLY_AFTER_INIT bool g_pci_access_io_probe_failed; READONLY_AFTER_INIT bool g_pci_access_is_disabled_from_commandline; @@ -83,4 +82,3 @@ UNMAP_AFTER_INIT bool test_pci_io() } } -} diff --git a/Kernel/Bus/PCI/Initializer.h b/Kernel/Bus/PCI/Initializer.h index 6bf92efeb5..4871a99d6c 100644 --- a/Kernel/Bus/PCI/Initializer.h +++ b/Kernel/Bus/PCI/Initializer.h @@ -6,8 +6,7 @@ #pragma once -namespace Kernel { -namespace PCI { +namespace Kernel::PCI { extern bool g_pci_access_io_probe_failed; extern bool g_pci_access_is_disabled_from_commandline; @@ -15,4 +14,3 @@ extern bool g_pci_access_is_disabled_from_commandline; void initialize(); } -}