summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2020-05-28 20:40:53 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-29 07:59:45 +0200
commit937d0be76219cb2d382f360c32bc970c859da065 (patch)
treebd1b71bb8da7a5dd2f4d65afa171ba267232fea0 /Kernel
parent8e151ff33e3459f3d7f71feb429122424228fb31 (diff)
downloadserenity-937d0be76219cb2d382f360c32bc970c859da065.zip
Meta: Add a script check the presence of "#pragma once" in header files
.. and make travis run it. I renamed check-license-headers.sh to check-style.sh and expanded it so that it now also checks for the presence of "#pragma once" in .h files. It also checks the presence of a (single) blank line above and below the "#pragma once" line. I also added "#pragma once" to all the files that need it: even the ones we are not check. I also added/removed blank lines in order to make the script not fail. I also ran clang-format on the files I modified.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Devices/PATAChannel.h5
-rw-r--r--Kernel/Devices/PATADiskDevice.h2
-rw-r--r--Kernel/Devices/SerialDevice.h2
-rw-r--r--Kernel/FileSystem/ext2_types.h2
-rw-r--r--Kernel/PCI/IOAccess.h1
-rw-r--r--Kernel/PCI/MMIOAccess.h1
-rw-r--r--Kernel/Ptrace.h1
7 files changed, 11 insertions, 3 deletions
diff --git a/Kernel/Devices/PATAChannel.h b/Kernel/Devices/PATAChannel.h
index c7ac026edd..09eed4216c 100644
--- a/Kernel/Devices/PATAChannel.h
+++ b/Kernel/Devices/PATAChannel.h
@@ -34,17 +34,18 @@
// More information about the ATA spec for PATA can be found here:
// ftp://ftp.seagate.com/acrobat/reference/111-1c.pdf
//
+
#pragma once
#include <AK/OwnPtr.h>
#include <AK/RefPtr.h>
+#include <Kernel/IO.h>
#include <Kernel/Lock.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/PCI/Device.h>
+#include <Kernel/PhysicalAddress.h>
#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
-#include <Kernel/IO.h>
-#include <Kernel/PhysicalAddress.h>
namespace Kernel {
diff --git a/Kernel/Devices/PATADiskDevice.h b/Kernel/Devices/PATADiskDevice.h
index 434aa0dfa1..9c0f051e26 100644
--- a/Kernel/Devices/PATADiskDevice.h
+++ b/Kernel/Devices/PATADiskDevice.h
@@ -27,7 +27,7 @@
//
// A Disk Device Connected to a PATA Channel
//
-//
+
#pragma once
#include <Kernel/Devices/BlockDevice.h>
diff --git a/Kernel/Devices/SerialDevice.h b/Kernel/Devices/SerialDevice.h
index cdfeec109e..a7f5fd4656 100644
--- a/Kernel/Devices/SerialDevice.h
+++ b/Kernel/Devices/SerialDevice.h
@@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#pragma once
+
#include <Kernel/Devices/CharacterDevice.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ext2_types.h b/Kernel/FileSystem/ext2_types.h
index 223d8195e5..1f79227daf 100644
--- a/Kernel/FileSystem/ext2_types.h
+++ b/Kernel/FileSystem/ext2_types.h
@@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#pragma once
+
/*
* If linux/types.h is already been included, assume it has defined
* everything we need. (cross fingers) Other header files may have
diff --git a/Kernel/PCI/IOAccess.h b/Kernel/PCI/IOAccess.h
index 57b66da2b6..eb2468c759 100644
--- a/Kernel/PCI/IOAccess.h
+++ b/Kernel/PCI/IOAccess.h
@@ -25,6 +25,7 @@
*/
#pragma once
+
#include <Kernel/PCI/Access.h>
namespace Kernel {
diff --git a/Kernel/PCI/MMIOAccess.h b/Kernel/PCI/MMIOAccess.h
index 984dcf31d1..d763a9bcfb 100644
--- a/Kernel/PCI/MMIOAccess.h
+++ b/Kernel/PCI/MMIOAccess.h
@@ -25,6 +25,7 @@
*/
#pragma once
+
#include <AK/HashMap.h>
#include <AK/OwnPtr.h>
#include <AK/Types.h>
diff --git a/Kernel/Ptrace.h b/Kernel/Ptrace.h
index c305cf3f89..6145ffa637 100644
--- a/Kernel/Ptrace.h
+++ b/Kernel/Ptrace.h
@@ -25,6 +25,7 @@
*/
#pragma once
+
#include <Kernel/KResult.h>
#include <Kernel/Process.h>
#include <Kernel/Syscall.h>