diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-16 19:05:46 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-08-17 13:31:43 +0100 |
commit | eedb26110aa92a6b7371fabad7f8574dbdc2606e (patch) | |
tree | ca78be93fad26a1b8dc258778aed3d2bc9b48ecf /Kernel | |
parent | 7ea55c883bb46487dff9ce41257d9913d356d04f (diff) | |
download | serenity-eedb26110aa92a6b7371fabad7f8574dbdc2606e.zip |
Kernel: Fix compilation with Clang
Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Bus/USB/UHCIRootHub.cpp | 30 | ||||
-rw-r--r-- | Kernel/Thread.cpp | 2 |
2 files changed, 21 insertions, 11 deletions
diff --git a/Kernel/Bus/USB/UHCIRootHub.cpp b/Kernel/Bus/USB/UHCIRootHub.cpp index 4b2fb34441..17c594f975 100644 --- a/Kernel/Bus/USB/UHCIRootHub.cpp +++ b/Kernel/Bus/USB/UHCIRootHub.cpp @@ -15,8 +15,10 @@ namespace Kernel::USB { static USBDeviceDescriptor uhci_root_hub_device_descriptor = { - sizeof(USBDeviceDescriptor), // 18 bytes long - DESCRIPTOR_TYPE_DEVICE, + { + sizeof(USBDeviceDescriptor), // 18 bytes long + DESCRIPTOR_TYPE_DEVICE, + }, 0x0110, // USB 1.1 (u8)USB_CLASS_HUB, 0, // Hubs use subclass 0 @@ -32,8 +34,10 @@ static USBDeviceDescriptor uhci_root_hub_device_descriptor = { }; static USBConfigurationDescriptor uhci_root_hub_configuration_descriptor = { - sizeof(USBConfigurationDescriptor), // 9 bytes long - DESCRIPTOR_TYPE_CONFIGURATION, + { + sizeof(USBConfigurationDescriptor), // 9 bytes long + DESCRIPTOR_TYPE_CONFIGURATION, + }, sizeof(USBConfigurationDescriptor) + sizeof(USBInterfaceDescriptor) + sizeof(USBEndpointDescriptor) + sizeof(USBHubDescriptor), // Combined length of configuration, interface, endpoint and hub descriptors. 1, // One interface descriptor 1, // Configuration #1 @@ -43,8 +47,10 @@ static USBConfigurationDescriptor uhci_root_hub_configuration_descriptor = { }; static USBInterfaceDescriptor uhci_root_hub_interface_descriptor = { - sizeof(USBInterfaceDescriptor), // 9 bytes long - DESCRIPTOR_TYPE_INTERFACE, + { + sizeof(USBInterfaceDescriptor), // 9 bytes long + DESCRIPTOR_TYPE_INTERFACE, + }, 0, // Interface #0 0, // Alternate setting 1, // One endpoint @@ -55,8 +61,10 @@ static USBInterfaceDescriptor uhci_root_hub_interface_descriptor = { }; static USBEndpointDescriptor uhci_root_hub_endpoint_descriptor = { - sizeof(USBEndpointDescriptor), // 7 bytes long - DESCRIPTOR_TYPE_ENDPOINT, + { + sizeof(USBEndpointDescriptor), // 7 bytes long + DESCRIPTOR_TYPE_ENDPOINT, + }, USBEndpoint::ENDPOINT_ADDRESS_DIRECTION_IN | 1, // IN Endpoint #1 USBEndpoint::ENDPOINT_ATTRIBUTES_TRANSFER_TYPE_INTERRUPT, // Interrupt endpoint 2, // Max Packet Size FIXME: I'm not sure what this is supposed to be as it is implementation defined. 2 is the number of bytes Get Port Status returns. @@ -65,8 +73,10 @@ static USBEndpointDescriptor uhci_root_hub_endpoint_descriptor = { // NOTE: UHCI does not provide us anything for the Root Hub's Hub Descriptor. static USBHubDescriptor uhci_root_hub_hub_descriptor = { - sizeof(USBHubDescriptor), // 7 bytes long. FIXME: Add the size of the VLAs at the end once they're supported. - DESCRIPTOR_TYPE_HUB, + { + sizeof(USBHubDescriptor), // 7 bytes long. FIXME: Add the size of the VLAs at the end once they're supported. + DESCRIPTOR_TYPE_HUB, + }, UHCIController::NUMBER_OF_ROOT_PORTS, // 2 ports 0x0, // Ganged power switching, not a compound device, global over-current protection. 0x0, // UHCI ports are always powered, so there's no time from power on to power good. diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index d330ddc77c..06954a485a 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -805,7 +805,7 @@ bool Thread::should_ignore_signal(u8 signal) const auto& action = m_signal_action_data[signal]; if (action.handler_or_sigaction.is_null()) return default_signal_action(signal) == DefaultSignalAction::Ignore; - if ((sighandler_t)action.handler_or_sigaction.as_ptr() == SIG_IGN) + if ((sighandler_t)action.handler_or_sigaction.get() == SIG_IGN) return true; return false; } |