1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Everywhere: Remove unnecessary clang-format offs

Mostly due to the fact that clang-format allows aligned comments via
AlignTrailingComments.

We could also use raw string literals in inline asm, which clang-format
deals with properly (and would be nicer in a lot of places).
This commit is contained in:
William McPherson 2021-03-04 19:15:17 +11:00 committed by Andreas Kling
parent 2119c9e801
commit 2479ead718
10 changed files with 8 additions and 29 deletions

View file

@ -42,7 +42,6 @@ namespace Kernel {
#define PIC1_CTL 0xA0
#define PIC1_CMD 0xA1
// clang-format off
#define ICW1_ICW4 0x01 /* ICW4 (not) needed */
#define ICW1_SINGLE 0x02 /* Single (cascade) mode */
#define ICW1_INTERVAL4 0x04 /* Call address interval 4 (8) */
@ -54,7 +53,6 @@ namespace Kernel {
#define ICW4_BUF_SLAVE 0x08 /* Buffered mode/slave */
#define ICW4_BUF_MASTER 0x0C /* Buffered mode/master */
#define ICW4_SFNM 0x10 /* Special fully nested (not) */
// clang-format on
bool inline static is_all_masked(u16 reg)
{

View file

@ -89,10 +89,7 @@ public:
m_have_storage = true;
}
// FIXME: clang-format gets confused about KResultOr. Why?
// clang-format off
KResultOr(KResultOr&& other)
// clang-format on
{
m_is_error = other.m_is_error;
if (m_is_error)

View file

@ -32,7 +32,6 @@
namespace Kernel {
// clang-format off
#define REG_CTRL 0x0000
#define REG_STATUS 0x0008
#define REG_EEPROM 0x0014
@ -139,7 +138,6 @@ namespace Kernel {
#define INTERRUPT_PHYINT (1 << 12)
#define INTERRUPT_TXD_LOW (1 << 15)
#define INTERRUPT_SRPD (1 << 16)
// clang-format on
// https://www.intel.com/content/dam/doc/manual/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf Section 5.2
static bool is_valid_device_id(u16 device_id)

View file

@ -35,7 +35,6 @@
namespace Kernel {
// clang-format off
#define PCI_VENDOR_ID 0x00 // word
#define PCI_DEVICE_ID 0x02 // word
#define PCI_COMMAND 0x04 // word
@ -68,7 +67,6 @@ namespace Kernel {
#define PCI_MAX_DEVICES_PER_BUS 32
#define PCI_MAX_BUSES 256
#define PCI_MAX_FUNCTIONS_PER_DEVICE 8
// clang-format on
namespace PCI {
struct ID {

View file

@ -648,7 +648,6 @@ struct ifreq {
unsigned int ifru_index;
} ifr_ifru;
// clang-format off
#define ifr_addr ifr_ifru.ifru_addr // address
#define ifr_dstaddr ifr_ifru.ifru_dstaddr // other end of p-to-p link
#define ifr_broadaddr ifr_ifru.ifru_broadaddr // broadcast address
@ -665,7 +664,6 @@ struct ifreq {
#define ifr_index ifr_ifru.ifru_index // interface index
#define ifr_llprio ifr_ifru.ifru_metric // link layer priority
#define ifr_hwaddr ifr_ifru.ifru_hwaddr // MAC address
// clang-format on
};
struct rtentry {