Use clang-format

This commit is contained in:
2025-12-21 22:53:25 +01:00
parent 8794a61073
commit b2d8294b12
36 changed files with 925 additions and 842 deletions

View File

@@ -1,49 +1,48 @@
#include <libk/std.h>
#include <sys/debug.h>
#include <mm/liballoc.h>
#include <limine/requests.h>
#include <mm/liballoc.h>
#include <sys/debug.h>
#include <uacpi/kernel_api.h>
#include <uacpi/status.h>
uacpi_status uacpi_kernel_get_rsdp(uacpi_phys_addr *out_rsdp_address) {
struct limine_hhdm_response *hhdm = limine_hhdm_request.response;
struct limine_rsdp_response *rsdp = limine_rsdp_request.response;
uacpi_status uacpi_kernel_get_rsdp (uacpi_phys_addr* out_rsdp_address) {
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
struct limine_rsdp_response* rsdp = limine_rsdp_request.response;
*out_rsdp_address = (uacpi_phys_addr)((uintptr_t)rsdp->address - (uintptr_t)hhdm->offset);
*out_rsdp_address =
(uacpi_phys_addr)((uintptr_t)rsdp->address - (uintptr_t)hhdm->offset);
return UACPI_STATUS_OK;
}
void *uacpi_kernel_map(uacpi_phys_addr addr, uacpi_size len) {
void* uacpi_kernel_map (uacpi_phys_addr addr, uacpi_size len) {
(void)len;
struct limine_hhdm_response *hhdm = limine_hhdm_request.response;
return (void *)((uintptr_t)hhdm->offset + (uintptr_t)addr);
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
return (void*)((uintptr_t)hhdm->offset + (uintptr_t)addr);
}
void uacpi_kernel_unmap(void *addr, uacpi_size len) {
(void)addr, (void)len;
}
void uacpi_kernel_unmap (void* addr, uacpi_size len) { (void)addr, (void)len; }
void uacpi_kernel_log(uacpi_log_level level, const uacpi_char* msg) {
const char *prefix = NULL;
void uacpi_kernel_log (uacpi_log_level level, const uacpi_char* msg) {
const char* prefix = NULL;
switch (level) {
case UACPI_LOG_DEBUG:
prefix = "Debug";
break;
case UACPI_LOG_TRACE:
prefix = "Trace";
break;
case UACPI_LOG_INFO:
prefix = "Info";
break;
case UACPI_LOG_WARN:
prefix = "Warning";
break;
case UACPI_LOG_ERROR:
prefix = "Error";
break;
case UACPI_LOG_DEBUG:
prefix = "Debug";
break;
case UACPI_LOG_TRACE:
prefix = "Trace";
break;
case UACPI_LOG_INFO:
prefix = "Info";
break;
case UACPI_LOG_WARN:
prefix = "Warning";
break;
case UACPI_LOG_ERROR:
prefix = "Error";
break;
}
DEBUG("%s %s", prefix, msg);
DEBUG ("%s %s", prefix, msg);
}