Parcourir la source

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.
b14ckcat il y a 3 ans
Parent
commit
c65a6b6b22

+ 1 - 4
Kernel/Bus/PCI/Definitions.h

@@ -14,9 +14,7 @@
 #include <Kernel/Debug.h>
 #include <Kernel/PhysicalAddress.h>
 
-namespace Kernel {
-
-namespace PCI {
+namespace Kernel::PCI {
 
 enum class HeaderType {
     Device = 0,
@@ -293,7 +291,6 @@ private:
 
 class Domain;
 class Device;
-}
 
 }
 

+ 1 - 3
Kernel/Bus/PCI/Device.cpp

@@ -8,8 +8,7 @@
 #include <Kernel/Bus/PCI/API.h>
 #include <Kernel/Bus/PCI/Device.h>
 
-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()
 }
 
 }
-}

+ 1 - 3
Kernel/Bus/PCI/Device.h

@@ -9,8 +9,7 @@
 #include <AK/Types.h>
 #include <Kernel/Bus/PCI/Definitions.h>
 
-namespace Kernel {
-namespace PCI {
+namespace Kernel::PCI {
 
 class Device {
 public:
@@ -37,4 +36,3 @@ private:
 };
 
 }
-}

+ 1 - 3
Kernel/Bus/PCI/Initializer.cpp

@@ -14,8 +14,7 @@
 #include <Kernel/Panic.h>
 #include <Kernel/Sections.h>
 
-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()
 }
 
 }
-}

+ 1 - 3
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();
 
 }
-}