mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:47:45 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -476,7 +476,7 @@ ErrorOr<void> UHCIController::spawn_port_process()
|
|||
return {};
|
||||
}
|
||||
|
||||
bool UHCIController::handle_irq(const RegisterState&)
|
||||
bool UHCIController::handle_irq(RegisterState const&)
|
||||
{
|
||||
u32 status = read_usbsts();
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ private:
|
|||
void write_portsc1(u16 value) { m_io_base.offset(0x10).out(value); }
|
||||
void write_portsc2(u16 value) { m_io_base.offset(0x12).out(value); }
|
||||
|
||||
virtual bool handle_irq(const RegisterState&) override;
|
||||
virtual bool handle_irq(RegisterState const&) override;
|
||||
|
||||
ErrorOr<void> create_structures();
|
||||
void setup_schedule();
|
||||
|
|
|
@ -185,11 +185,11 @@ struct alignas(16) TransferDescriptor final {
|
|||
|
||||
// FIXME: For the love of God, use AK SMART POINTERS PLEASE!!
|
||||
TransferDescriptor* next_td() { return m_next_td; }
|
||||
const TransferDescriptor* next_td() const { return m_next_td; }
|
||||
TransferDescriptor const* next_td() const { return m_next_td; }
|
||||
void set_next_td(TransferDescriptor* td) { m_next_td = td; }
|
||||
|
||||
TransferDescriptor* prev_td() { return m_prev_td; }
|
||||
const TransferDescriptor* prev_td() const { return m_prev_td; }
|
||||
TransferDescriptor const* prev_td() const { return m_prev_td; }
|
||||
void set_previous_td(TransferDescriptor* td) { m_prev_td = td; }
|
||||
|
||||
void insert_next_transfer_descriptor(TransferDescriptor* td)
|
||||
|
@ -274,11 +274,11 @@ struct alignas(16) QueueHead {
|
|||
|
||||
// FIXME: For the love of God, use AK SMART POINTERS PLEASE!!
|
||||
QueueHead* next_qh() { return m_next_qh; }
|
||||
const QueueHead* next_qh() const { return m_next_qh; }
|
||||
QueueHead const* next_qh() const { return m_next_qh; }
|
||||
void set_next_qh(QueueHead* qh) { m_next_qh = qh; }
|
||||
|
||||
QueueHead* prev_qh() { return m_prev_qh; }
|
||||
const QueueHead* prev_qh() const { return m_prev_qh; }
|
||||
QueueHead const* prev_qh() const { return m_prev_qh; }
|
||||
void set_previous_qh(QueueHead* qh)
|
||||
{
|
||||
m_prev_qh = qh;
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
u8 address() const { return m_address; }
|
||||
|
||||
const USBDeviceDescriptor& device_descriptor() const { return m_device_descriptor; }
|
||||
USBDeviceDescriptor const& device_descriptor() const { return m_device_descriptor; }
|
||||
|
||||
USBController& controller() { return *m_controller; }
|
||||
USBController const& controller() const { return *m_controller; }
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
static constexpr u8 ENDPOINT_ATTRIBUTES_ISO_MODE_SYNC_TYPE = 0x0c;
|
||||
static constexpr u8 ENDPOINT_ATTRIBUTES_ISO_MODE_USAGE_TYPE = 0x30;
|
||||
|
||||
const USBEndpointDescriptor& descriptor() const { return m_descriptor; }
|
||||
USBEndpointDescriptor const& descriptor() const { return m_descriptor; }
|
||||
|
||||
bool is_control() const { return (m_descriptor.endpoint_attributes_bitmap & ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_MASK) == ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_CONTROL; }
|
||||
bool is_isochronous() const { return (m_descriptor.endpoint_attributes_bitmap & ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_MASK) == ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_ISOCHRONOUS; }
|
||||
|
|
|
@ -26,7 +26,7 @@ Transfer::Transfer(Pipe& pipe, u16 len, NonnullOwnPtr<Memory::Region> data_buffe
|
|||
|
||||
Transfer::~Transfer() = default;
|
||||
|
||||
void Transfer::set_setup_packet(const USBRequestData& request)
|
||||
void Transfer::set_setup_packet(USBRequestData const& request)
|
||||
{
|
||||
// Kind of a nasty hack... Because the kernel isn't in the business
|
||||
// of handing out physical pointers that we can directly write to,
|
||||
|
|
|
@ -24,13 +24,13 @@ public:
|
|||
Transfer() = delete;
|
||||
~Transfer();
|
||||
|
||||
void set_setup_packet(const USBRequestData& request);
|
||||
void set_setup_packet(USBRequestData const& request);
|
||||
void set_complete() { m_complete = true; }
|
||||
void set_error_occurred() { m_error_occurred = true; }
|
||||
|
||||
// `const` here makes sure we don't blow up by writing to a physical address
|
||||
const USBRequestData& request() const { return m_request; }
|
||||
const Pipe& pipe() const { return m_pipe; }
|
||||
USBRequestData const& request() const { return m_request; }
|
||||
Pipe const& pipe() const { return m_pipe; }
|
||||
Pipe& pipe() { return m_pipe; }
|
||||
VirtualAddress buffer() const { return m_data_buffer->vaddr(); }
|
||||
PhysicalAddress buffer_physical() const { return m_data_buffer->physical_page(0)->paddr(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue