From f23a32d331afab0e8e21a70052257930067044ce Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Wed, 21 Dec 2022 04:00:33 -0500 Subject: [PATCH] Fix KUSB.ZC pointer star formatting. --- src/Kernel/KUSB.ZC | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Kernel/KUSB.ZC b/src/Kernel/KUSB.ZC index f0d1417e..9e31b1ea 100644 --- a/src/Kernel/KUSB.ZC +++ b/src/Kernel/KUSB.ZC @@ -19,7 +19,7 @@ class CUSB //Not implemented U8 num, //USB dev num bus, dev, fun; U16 ports, pad; - U32 * frame_lst; + U32 *frame_lst; }; //USB Pkt ID's @@ -54,20 +54,19 @@ class CUSB //Not implemented I64 sys_num_usb = 0; CUSB sys_usb_devs[USB_NUM]; -MemSet(sys_usb_devs, 0, USB_NUM* sizeof(CUSB)); +MemSet(sys_usb_devs, 0, USB_NUM * sizeof(CUSB)); U0 USBInitOne(I64 b, I64 d, I64 f) { - CUSB * u; - if (sys_num_usb < USB_NUM && - PCIReadU16(b, d, f, 0) == 0x8086) + CUSB *u; + if (sys_num_usb < USB_NUM && PCIReadU16(b, d, f, 0) == 0x8086) { u = &sys_usb_devs[sys_num_usb++]; u->num = sys_num_usb; u->bus = b; u->dev = d; u->fun = f; - u->ports = PCIReadU32(b, d, f, 0x20) &~0x1F; + u->ports = PCIReadU32(b, d, f, 0x20) & ~0x1F; } } @@ -89,7 +88,7 @@ U0 USBInitAll() //This is only valid for my ICH10 dev USBInitOne(0, 26, 2); } -CUSBTD* USBAllocTD() +CUSBTD *USBAllocTD() { return MAllocAligned(sizeof(CUSBTD), 0x10, dev.uncached_heap); } @@ -102,12 +101,12 @@ U0 USBFreeTD(CUSBTD *tmptd) U32* USBAllocFrameLst(I64 usb_num, I64 size) { //aligned to 0x1000 - CUSB * u; + CUSB *u; if (0 <= usb_num < sys_num_usb) { u = &sys_usb_devs[usb_num]; Free(u->frame_lst); - u->frame_lst = MAllocAligned(size* sizeof(U32), 0x1000, dev.uncached_heap); + u->frame_lst = MAllocAligned(size * sizeof(U32), 0x1000, dev.uncached_heap); OutU16(u->ports + USBP_CMD, 0); //Stop OutU16(u->ports + USBP_FRNUM, 0); OutU32(u->ports + USBP_FRBASEADD, u->frame_lst); @@ -115,4 +114,4 @@ U32* USBAllocFrameLst(I64 usb_num, I64 size) } return NULL; -} \ No newline at end of file +}