summaryrefslogtreecommitdiff
path: root/Kernel/Devices
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/Devices
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/Devices')
-rw-r--r--Kernel/Devices/PATAChannel.h5
-rw-r--r--Kernel/Devices/PATADiskDevice.h2
-rw-r--r--Kernel/Devices/SerialDevice.h2
3 files changed, 6 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 {