1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:17:35 +00:00

Kernel: Some clang-tidy fixes in Bus/USB

This commit is contained in:
Hendiadyoin1 2021-12-08 13:52:14 +01:00 committed by Brian Gianforcaro
parent b03b7f806a
commit 471b38db68
7 changed files with 6 additions and 9 deletions

View file

@ -88,7 +88,6 @@ private:
void reset_port(u8);
private:
IOAddress m_io_base;
OwnPtr<UHCIRootHub> m_root_hub;

View file

@ -68,7 +68,7 @@ private:
{
// Go through the number of descriptors to create in the pool, and create a virtual/physical address mapping
for (size_t i = 0; i < PAGE_SIZE / sizeof(T); i++) {
auto placement_address = reinterpret_cast<void*>(m_pool_region->vaddr().get() + (i * sizeof(T)));
auto* placement_address = reinterpret_cast<void*>(m_pool_region->vaddr().get() + (i * sizeof(T)));
auto physical_address = static_cast<u32>(m_pool_region->physical_page(0)->paddr().get() + (i * sizeof(T)));
auto* object = new (placement_address) T(physical_address);
m_free_descriptor_stack.push(object); // Push the descriptor's pointer onto the free list

View file

@ -85,11 +85,11 @@ static USBHubDescriptor uhci_root_hub_hub_descriptor = {
ErrorOr<NonnullOwnPtr<UHCIRootHub>> UHCIRootHub::try_create(NonnullRefPtr<UHCIController> uhci_controller)
{
return adopt_nonnull_own_or_enomem(new (nothrow) UHCIRootHub(uhci_controller));
return adopt_nonnull_own_or_enomem(new (nothrow) UHCIRootHub(move(uhci_controller)));
}
UHCIRootHub::UHCIRootHub(NonnullRefPtr<UHCIController> uhci_controller)
: m_uhci_controller(uhci_controller)
: m_uhci_controller(move(uhci_controller))
{
}
@ -109,7 +109,7 @@ ErrorOr<void> UHCIRootHub::setup(Badge<UHCIController>)
ErrorOr<size_t> UHCIRootHub::handle_control_transfer(Transfer& transfer)
{
auto& request = transfer.request();
auto const& request = transfer.request();
auto* request_data = transfer.buffer().as_ptr() + sizeof(USBRequestData);
if constexpr (UHCI_DEBUG) {