1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:57:45 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -156,7 +156,7 @@ UNMAP_AFTER_INIT RTL8139NetworkAdapter::RTL8139NetworkAdapter(PCI::Address addre
reset();
read_mac_address();
const auto& mac = mac_address();
auto const& mac = mac_address();
dmesgln("RTL8139: MAC address: {}", mac.to_string());
enable_irq();
@ -164,7 +164,7 @@ UNMAP_AFTER_INIT RTL8139NetworkAdapter::RTL8139NetworkAdapter(PCI::Address addre
UNMAP_AFTER_INIT RTL8139NetworkAdapter::~RTL8139NetworkAdapter() = default;
bool RTL8139NetworkAdapter::handle_irq(const RegisterState&)
bool RTL8139NetworkAdapter::handle_irq(RegisterState const&)
{
bool was_handled = false;
for (;;) {
@ -324,8 +324,8 @@ void RTL8139NetworkAdapter::receive()
{
auto* start_of_packet = m_rx_buffer->vaddr().as_ptr() + m_rx_buffer_offset;
u16 status = *(const u16*)(start_of_packet + 0);
u16 length = *(const u16*)(start_of_packet + 2);
u16 status = *(u16 const*)(start_of_packet + 0);
u16 length = *(u16 const*)(start_of_packet + 2);
dbgln_if(RTL8139_DEBUG, "RTL8139: receive, status={:#04x}, length={}, offset={}", status, length, m_rx_buffer_offset);
@ -338,7 +338,7 @@ void RTL8139NetworkAdapter::receive()
// we never have to worry about the packet wrapping around the buffer,
// since we set RXCFG_WRAP_INHIBIT, which allows the rtl8139 to write data
// past the end of the allotted space.
memcpy(m_packet_buffer->vaddr().as_ptr(), (const u8*)(start_of_packet + 4), length - 4);
memcpy(m_packet_buffer->vaddr().as_ptr(), (u8 const*)(start_of_packet + 4), length - 4);
// let the card know that we've read this data
m_rx_buffer_offset = ((m_rx_buffer_offset + length + 4 + 3) & ~3) % RX_BUFFER_SIZE;
out16(REG_CAPR, m_rx_buffer_offset - 0x10);

View file

@ -35,7 +35,7 @@ public:
private:
RTL8139NetworkAdapter(PCI::Address, u8 irq, NonnullOwnPtr<KString>);
virtual bool handle_irq(const RegisterState&) override;
virtual bool handle_irq(RegisterState const&) override;
virtual StringView class_name() const override { return "RTL8139NetworkAdapter"sv; }
void reset();

View file

@ -1127,7 +1127,7 @@ UNMAP_AFTER_INIT void RTL8168NetworkAdapter::initialize_tx_descriptors()
UNMAP_AFTER_INIT RTL8168NetworkAdapter::~RTL8168NetworkAdapter() = default;
bool RTL8168NetworkAdapter::handle_irq(const RegisterState&)
bool RTL8168NetworkAdapter::handle_irq(RegisterState const&)
{
bool was_handled = false;
for (;;) {

View file

@ -40,7 +40,7 @@ private:
RTL8168NetworkAdapter(PCI::Address, u8 irq, NonnullOwnPtr<KString>);
virtual bool handle_irq(const RegisterState&) override;
virtual bool handle_irq(RegisterState const&) override;
virtual StringView class_name() const override { return "RTL8168NetworkAdapter"sv; }
bool determine_supported_version() const;